C++ tests for cbmc

git-svn-id: svn+ssh://svn.cprover.org/srv/svn/cbmc/trunk@1881 6afb6bc1-c8e4-404c-8f48-9ae832c5b171
This commit is contained in:
kroening 2012-11-03 15:39:05 +00:00
parent 5a92fde7ed
commit f7a0c3d36c
3 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,14 @@
default: tests.log
test:
@../test.pl -c cbmc
tests.log: ../test.pl
@../test.pl -c cbmc
show:
@for dir in *; do \
if [ -d "$$dir" ]; then \
vim -o "$$dir/*.c" "$$dir/*.out"; \
fi; \
done;

View File

@ -0,0 +1,16 @@
struct A
{
union
{
int a;
char b;
};
};
int main()
{
A obj;
obj.a = 'z';
assert(obj.b=='z'); // little endian assumption
assert(sizeof(A) == sizeof(int));
}

View File

@ -0,0 +1,8 @@
CORE
main.cpp
--little-endian
^EXIT=0$
^SIGNAL=0$
^VERIFICATION SUCCESSFUL$
--
^warning: ignoring