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:
parent
5a92fde7ed
commit
f7a0c3d36c
|
@ -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;
|
|
@ -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));
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
CORE
|
||||
main.cpp
|
||||
--little-endian
|
||||
^EXIT=0$
|
||||
^SIGNAL=0$
|
||||
^VERIFICATION SUCCESSFUL$
|
||||
--
|
||||
^warning: ignoring
|
Loading…
Reference in New Issue