Skip to content

Commit 2d31501

Browse files
author
Daniel Kroening
committed
test for printf
1 parent 8e532ee commit 2d31501

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

regression/cbmc/printf1/main.c

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include <stdio.h>
2+
#include <assert.h>
3+
4+
int main()
5+
{
6+
printf("PRINT d1 %d, %d\n", 123, -123);
7+
printf("PRINT g1 %g, %g, %g, %g\n", 123.0, -123.0, 123.123, 0.123);
8+
printf("PRINT e1 %e, %e, %e, %e\n", 123.0, -123.0, 123.123, 0.123);
9+
printf("PRINT f1 %f, %f, %f, %f\n", 123.0, -123.0, 123.123, 0.123);
10+
assert(0);
11+
}

regression/cbmc/printf1/test.desc

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CORE
2+
main.c
3+
--trace
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^PRINT d1 123, -123$
7+
^PRINT g1 123, -123, 123\.123, 0\.123$
8+
^PRINT e1 1\.230000e\+2, -1\.230000e\+2, 1\.231230e\+2, 1\.230000e-1$
9+
^PRINT f1 123\.000000, -123\.000000, 123\.123000, 0\.123000$
10+
--
11+
^warning: ignoring

0 commit comments

Comments
 (0)