diff --git a/tests/35_sizeof.c b/tests/35_sizeof.c new file mode 100644 index 0000000..70ae64e --- /dev/null +++ b/tests/35_sizeof.c @@ -0,0 +1,5 @@ +char a; +short b; + +printf("%d %d\n", sizeof(char), sizeof(a)); +printf("%d %d\n", sizeof(short), sizeof(b)); diff --git a/tests/35_sizeof.expect b/tests/35_sizeof.expect new file mode 100644 index 0000000..534fb83 --- /dev/null +++ b/tests/35_sizeof.expect @@ -0,0 +1,2 @@ +1 1 +2 2 diff --git a/tests/Makefile b/tests/Makefile index 5b00ba6..02dfa14 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -27,7 +27,8 @@ TESTS= 00_assignment.test \ 26_character_constants.test \ 28_strings.test \ 29_array_address.test \ - 34_array_assignment.test + 34_array_assignment.test \ + 35_sizeof.test %.test: %.expect %.c @echo Test: $*...