tests: Added numerous tests.
commit42c1b6ba380d9d1ab85f0cc21db07e71667cc682
authorMilutin Jovanović <jovanovic.milutin@gmail.com>
Mon, 18 Jun 2012 17:27:32 +0000 (18 13:27 -0400)
committerMilutin Jovanović <jovanovic.milutin@gmail.com>
Mon, 18 Jun 2012 19:11:39 +0000 (18 15:11 -0400)
treee5eb7e317ad696d0975e463771c25c8a3c01260c
parentb0ebcfa7bae4a8743698107a82fffc598818ccc5
tests: Added numerous tests.

The tests are taken almost verbatim from the open source project PicoC. It can
be found at https://code.google.com/p/picoc/.

The tests range from very simple/trivial ones to more complicated. My view is
that the more tests the better. Without tests like this I was very reluctant to
make any changes to tcc for the fear of breaking things.

The tests pass on Win32, OSX, Linux x86 and x86_64. One or two tests fail on
each platform due to differences in the runtime library.
111 files changed:
Makefile
tests2/00_assignment.c [new file with mode: 0644]
tests2/00_assignment.expect [new file with mode: 0644]
tests2/01_comment.c [new file with mode: 0644]
tests2/01_comment.expect [new file with mode: 0644]
tests2/02_printf.c [new file with mode: 0644]
tests2/02_printf.expect [new file with mode: 0644]
tests2/03_struct.c [new file with mode: 0644]
tests2/03_struct.expect [new file with mode: 0644]
tests2/04_for.c [new file with mode: 0644]
tests2/04_for.expect [new file with mode: 0644]
tests2/05_array.c [new file with mode: 0644]
tests2/05_array.expect [new file with mode: 0644]
tests2/06_case.c [new file with mode: 0644]
tests2/06_case.expect [new file with mode: 0644]
tests2/07_function.c [new file with mode: 0644]
tests2/07_function.expect [new file with mode: 0644]
tests2/08_while.c [new file with mode: 0644]
tests2/08_while.expect [new file with mode: 0644]
tests2/09_do_while.c [new file with mode: 0644]
tests2/09_do_while.expect [new file with mode: 0644]
tests2/10_pointer.c [new file with mode: 0644]
tests2/10_pointer.expect [new file with mode: 0644]
tests2/11_precedence.c [new file with mode: 0644]
tests2/11_precedence.expect [new file with mode: 0644]
tests2/12_hashdefine.c [new file with mode: 0644]
tests2/12_hashdefine.expect [new file with mode: 0644]
tests2/13_integer_literals.c [new file with mode: 0644]
tests2/13_integer_literals.expect [new file with mode: 0644]
tests2/14_if.c [new file with mode: 0644]
tests2/14_if.expect [new file with mode: 0644]
tests2/15_recursion.c [new file with mode: 0644]
tests2/15_recursion.expect [new file with mode: 0644]
tests2/16_nesting.c [new file with mode: 0644]
tests2/16_nesting.expect [new file with mode: 0644]
tests2/17_enum.c [new file with mode: 0644]
tests2/17_enum.expect [new file with mode: 0644]
tests2/18_include.c [new file with mode: 0644]
tests2/18_include.expect [new file with mode: 0644]
tests2/18_include.h [new file with mode: 0644]
tests2/19_pointer_arithmetic.c [new file with mode: 0644]
tests2/19_pointer_arithmetic.expect [new file with mode: 0644]
tests2/20_pointer_comparison.c [new file with mode: 0644]
tests2/20_pointer_comparison.expect [new file with mode: 0644]
tests2/21_char_array.c [new file with mode: 0644]
tests2/21_char_array.expect [new file with mode: 0644]
tests2/22_floating_point.c [new file with mode: 0644]
tests2/22_floating_point.expect [new file with mode: 0644]
tests2/23_type_coercion.c [new file with mode: 0644]
tests2/23_type_coercion.expect [new file with mode: 0644]
tests2/24_math_library.c [new file with mode: 0644]
tests2/24_math_library.expect [new file with mode: 0644]
tests2/25_quicksort.c [new file with mode: 0644]
tests2/25_quicksort.expect [new file with mode: 0644]
tests2/26_character_constants.c [new file with mode: 0644]
tests2/26_character_constants.expect [new file with mode: 0644]
tests2/27_sizeof.c [new file with mode: 0644]
tests2/27_sizeof.expect [new file with mode: 0644]
tests2/28_strings.c [new file with mode: 0644]
tests2/28_strings.expect [new file with mode: 0644]
tests2/29_array_address.c [new file with mode: 0644]
tests2/29_array_address.expect [new file with mode: 0644]
tests2/30_hanoi.c [new file with mode: 0644]
tests2/30_hanoi.expect [new file with mode: 0644]
tests2/31_args.c [new file with mode: 0644]
tests2/31_args.expect [new file with mode: 0644]
tests2/32_led.c [new file with mode: 0644]
tests2/32_led.expect [new file with mode: 0644]
tests2/33_ternary_op.c [new file with mode: 0644]
tests2/33_ternary_op.expect [new file with mode: 0644]
tests2/34_array_assignment.c [new file with mode: 0644]
tests2/34_array_assignment.expect [new file with mode: 0644]
tests2/35_sizeof.c [new file with mode: 0644]
tests2/35_sizeof.expect [new file with mode: 0644]
tests2/36_array_initialisers.c [new file with mode: 0644]
tests2/36_array_initialisers.expect [new file with mode: 0644]
tests2/37_sprintf.c [new file with mode: 0644]
tests2/37_sprintf.expect [new file with mode: 0644]
tests2/38_multiple_array_index.c [new file with mode: 0644]
tests2/38_multiple_array_index.expect [new file with mode: 0644]
tests2/39_typedef.c [new file with mode: 0644]
tests2/39_typedef.expect [new file with mode: 0644]
tests2/40_stdio.c [new file with mode: 0644]
tests2/40_stdio.expect [new file with mode: 0644]
tests2/41_hashif.c [new file with mode: 0644]
tests2/41_hashif.expect [new file with mode: 0644]
tests2/42_function_pointer.c [new file with mode: 0644]
tests2/42_function_pointer.expect [new file with mode: 0644]
tests2/43_void_param.c [new file with mode: 0644]
tests2/43_void_param.expect [new file with mode: 0644]
tests2/44_scoped_declarations.c [new file with mode: 0644]
tests2/44_scoped_declarations.expect [new file with mode: 0644]
tests2/45_empty_for.c [new file with mode: 0644]
tests2/45_empty_for.expect [new file with mode: 0644]
tests2/46_grep.c [new file with mode: 0644]
tests2/47_switch_return.c [new file with mode: 0644]
tests2/47_switch_return.expect [new file with mode: 0644]
tests2/48_nested_break.c [new file with mode: 0644]
tests2/48_nested_break.expect [new file with mode: 0644]
tests2/49_bracket_evaluation.c [new file with mode: 0644]
tests2/49_bracket_evaluation.expect [new file with mode: 0644]
tests2/50_logical_second_arg.c [new file with mode: 0644]
tests2/50_logical_second_arg.expect [new file with mode: 0644]
tests2/51_static.c [new file with mode: 0644]
tests2/51_static.expect [new file with mode: 0644]
tests2/52_unnamed_enum.c [new file with mode: 0644]
tests2/52_unnamed_enum.expect [new file with mode: 0644]
tests2/54_goto.c [new file with mode: 0644]
tests2/54_goto.expect [new file with mode: 0644]
tests2/LICENSE [new file with mode: 0644]
tests2/Makefile [new file with mode: 0644]