diff options
Diffstat (limited to 'tests/pracownia2/error')
132 files changed, 917 insertions, 0 deletions
diff --git a/tests/pracownia2/error/000_length_as_boolA.xi b/tests/pracownia2/error/000_length_as_boolA.xi new file mode 100644 index 0000000..55d1312 --- /dev/null +++ b/tests/pracownia2/error/000_length_as_boolA.xi @@ -0,0 +1,6 @@ +test(x:int[]):bool[] +{ + return length(x) +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/001_decl_curly_bool.xi b/tests/pracownia2/error/001_decl_curly_bool.xi new file mode 100644 index 0000000..92b81d2 --- /dev/null +++ b/tests/pracownia2/error/001_decl_curly_bool.xi @@ -0,0 +1,6 @@ +test() +{ + i:bool = {} +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/002_init2_boolA_fst_only.xi b/tests/pracownia2/error/002_init2_boolA_fst_only.xi new file mode 100644 index 0000000..c1fdfd3 --- /dev/null +++ b/tests/pracownia2/error/002_init2_boolA_fst_only.xi @@ -0,0 +1,7 @@ +test() +{ + i:bool[]; + a:int[i][]; +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/003_comp_gt_intA_boolA.xi b/tests/pracownia2/error/003_comp_gt_intA_boolA.xi new file mode 100644 index 0000000..172d5bc --- /dev/null +++ b/tests/pracownia2/error/003_comp_gt_intA_boolA.xi @@ -0,0 +1,7 @@ +test(a:int[], b:bool[]):bool +{ + return a > b +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/004_formal_arg_initialized_array.xi b/tests/pracownia2/error/004_formal_arg_initialized_array.xi new file mode 100644 index 0000000..c234a52 --- /dev/null +++ b/tests/pracownia2/error/004_formal_arg_initialized_array.xi @@ -0,0 +1,5 @@ +test(x:int[43]) +{ +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/005_length_bool.xi b/tests/pracownia2/error/005_length_bool.xi new file mode 100644 index 0000000..27324e4 --- /dev/null +++ b/tests/pracownia2/error/005_length_bool.xi @@ -0,0 +1,6 @@ +test(x:bool):int +{ + return length(x) +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/006_decl_and_def.xi b/tests/pracownia2/error/006_decl_and_def.xi new file mode 100644 index 0000000..4087f76 --- /dev/null +++ b/tests/pracownia2/error/006_decl_and_def.xi @@ -0,0 +1,9 @@ +f(x:int):bool + +f(x:int):bool +{ + return true +} + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/007_function_used_as_procedure.xi b/tests/pracownia2/error/007_function_used_as_procedure.xi new file mode 100644 index 0000000..bcf00cc --- /dev/null +++ b/tests/pracownia2/error/007_function_used_as_procedure.xi @@ -0,0 +1,9 @@ +f():int + +g() +{ + f() +} + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/008_comp_le_bool.xi b/tests/pracownia2/error/008_comp_le_bool.xi new file mode 100644 index 0000000..d4d45f1 --- /dev/null +++ b/tests/pracownia2/error/008_comp_le_bool.xi @@ -0,0 +1,7 @@ +test(a:bool, b:bool):bool +{ + return a < b +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/009_shadowing_decl_return.xi b/tests/pracownia2/error/009_shadowing_decl_return.xi new file mode 100644 index 0000000..66fe649 --- /dev/null +++ b/tests/pracownia2/error/009_shadowing_decl_return.xi @@ -0,0 +1,5 @@ +f(x:int) +f(x:int) : int + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/010_def_and_decl.xi b/tests/pracownia2/error/010_def_and_decl.xi new file mode 100644 index 0000000..f89d6bf --- /dev/null +++ b/tests/pracownia2/error/010_def_and_decl.xi @@ -0,0 +1,9 @@ +f(x:int):bool +{ + return true +} + +f(x:int):bool + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/011_procedure_used_as_function_init.xi b/tests/pracownia2/error/011_procedure_used_as_function_init.xi new file mode 100644 index 0000000..627c357 --- /dev/null +++ b/tests/pracownia2/error/011_procedure_used_as_function_init.xi @@ -0,0 +1,8 @@ +f() + +g() +{ + x:int = f() +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/012_comp_le_intA_boolA.xi b/tests/pracownia2/error/012_comp_le_intA_boolA.xi new file mode 100644 index 0000000..333e826 --- /dev/null +++ b/tests/pracownia2/error/012_comp_le_intA_boolA.xi @@ -0,0 +1,7 @@ +test(a:int[], b:bool[]):bool +{ + return a < b +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/013_string_boolA.xi b/tests/pracownia2/error/013_string_boolA.xi new file mode 100644 index 0000000..55510e0 --- /dev/null +++ b/tests/pracownia2/error/013_string_boolA.xi @@ -0,0 +1,7 @@ +test() +{ + x:bool = "Polonia" +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/014_if_cond_boolA.xi b/tests/pracownia2/error/014_if_cond_boolA.xi new file mode 100644 index 0000000..b8c0f8d --- /dev/null +++ b/tests/pracownia2/error/014_if_cond_boolA.xi @@ -0,0 +1,7 @@ +test(x:bool[]) +{ + if x { + } +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/015_function_missing_return_if.xi b/tests/pracownia2/error/015_function_missing_return_if.xi new file mode 100644 index 0000000..403e9ef --- /dev/null +++ b/tests/pracownia2/error/015_function_missing_return_if.xi @@ -0,0 +1,7 @@ +f(x:bool):int +{ + if (x) { + } +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/016_formal_pars_decl.xi b/tests/pracownia2/error/016_formal_pars_decl.xi new file mode 100644 index 0000000..8f01fdf --- /dev/null +++ b/tests/pracownia2/error/016_formal_pars_decl.xi @@ -0,0 +1,4 @@ +test(x:int, x:int, y:bool) + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/017_int_boolA.xi b/tests/pracownia2/error/017_int_boolA.xi new file mode 100644 index 0000000..3e1f998 --- /dev/null +++ b/tests/pracownia2/error/017_int_boolA.xi @@ -0,0 +1,7 @@ +test() +{ + x:bool[] = 42 +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/018_decl_curly_int.xi b/tests/pracownia2/error/018_decl_curly_int.xi new file mode 100644 index 0000000..060f89f --- /dev/null +++ b/tests/pracownia2/error/018_decl_curly_int.xi @@ -0,0 +1,6 @@ +test() +{ + i:int = {} +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/019_multi_return_type_initialized_array.xi b/tests/pracownia2/error/019_multi_return_type_initialized_array.xi new file mode 100644 index 0000000..c4d820d --- /dev/null +++ b/tests/pracownia2/error/019_multi_return_type_initialized_array.xi @@ -0,0 +1,4 @@ +test(): bool[], int[42], bool[][] + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/020_procedure_used_as_function_ifcond.xi b/tests/pracownia2/error/020_procedure_used_as_function_ifcond.xi new file mode 100644 index 0000000..46170b7 --- /dev/null +++ b/tests/pracownia2/error/020_procedure_used_as_function_ifcond.xi @@ -0,0 +1,9 @@ +f() + +g() +{ + if f() { + } +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/021_expected_2_given3.xi b/tests/pracownia2/error/021_expected_2_given3.xi new file mode 100644 index 0000000..2515d4c --- /dev/null +++ b/tests/pracownia2/error/021_expected_2_given3.xi @@ -0,0 +1,8 @@ +f(): int, int, int + +g() +{ + x:int, y:int = f() +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/022_function_missing_return_ifelse_else_return.xi b/tests/pracownia2/error/022_function_missing_return_ifelse_else_return.xi new file mode 100644 index 0000000..ecaab14 --- /dev/null +++ b/tests/pracownia2/error/022_function_missing_return_ifelse_else_return.xi @@ -0,0 +1,9 @@ +f(x:bool):int +{ + if (x) { + } else { + return 0 + } +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/023_bool_as_A.xi b/tests/pracownia2/error/023_bool_as_A.xi new file mode 100644 index 0000000..bb38907 --- /dev/null +++ b/tests/pracownia2/error/023_bool_as_A.xi @@ -0,0 +1,7 @@ +test() +{ + x:bool; + x[0] = 1; +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/024_char_intA.xi b/tests/pracownia2/error/024_char_intA.xi new file mode 100644 index 0000000..d60f490 --- /dev/null +++ b/tests/pracownia2/error/024_char_intA.xi @@ -0,0 +1,7 @@ +test() +{ + x:int[] = 'X' +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/025_rem_trueture.xi b/tests/pracownia2/error/025_rem_trueture.xi new file mode 100644 index 0000000..581d5c6 --- /dev/null +++ b/tests/pracownia2/error/025_rem_trueture.xi @@ -0,0 +1,7 @@ +f():bool +{ + return true % true +} + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/026_function_missing_return_ifelse.xi b/tests/pracownia2/error/026_function_missing_return_ifelse.xi new file mode 100644 index 0000000..607c154 --- /dev/null +++ b/tests/pracownia2/error/026_function_missing_return_ifelse.xi @@ -0,0 +1,8 @@ +f(x:bool):int +{ + if (x) { + } else { + } +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/027_boolA_index.xi b/tests/pracownia2/error/027_boolA_index.xi new file mode 100644 index 0000000..e2a257f --- /dev/null +++ b/tests/pracownia2/error/027_boolA_index.xi @@ -0,0 +1,7 @@ +test(a:bool[]) +{ + i:bool[]; + a[i] = true; +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/028_shadowing_decl_more_fpars.xi b/tests/pracownia2/error/028_shadowing_decl_more_fpars.xi new file mode 100644 index 0000000..f4dcf00 --- /dev/null +++ b/tests/pracownia2/error/028_shadowing_decl_more_fpars.xi @@ -0,0 +1,5 @@ +f(x:int, y:int) +f(x:int, y:int, z:bool) + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/029_expected_2_given1_joker.xi b/tests/pracownia2/error/029_expected_2_given1_joker.xi new file mode 100644 index 0000000..0fd29ac --- /dev/null +++ b/tests/pracownia2/error/029_expected_2_given1_joker.xi @@ -0,0 +1,8 @@ +f(): int + +g() +{ + x:int, _ = f() +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/030_assign_curly_int.xi b/tests/pracownia2/error/030_assign_curly_int.xi new file mode 100644 index 0000000..e40ff75 --- /dev/null +++ b/tests/pracownia2/error/030_assign_curly_int.xi @@ -0,0 +1,7 @@ +test() +{ + i:int; + i = {} +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/031_int_as_A.xi b/tests/pracownia2/error/031_int_as_A.xi new file mode 100644 index 0000000..30d623d --- /dev/null +++ b/tests/pracownia2/error/031_int_as_A.xi @@ -0,0 +1,7 @@ +test() +{ + x:int; + x[0] = 1; +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/032_comp_gt_bool.xi b/tests/pracownia2/error/032_comp_gt_bool.xi new file mode 100644 index 0000000..3600828 --- /dev/null +++ b/tests/pracownia2/error/032_comp_gt_bool.xi @@ -0,0 +1,7 @@ +test(a:bool, b:bool):bool +{ + return a > b +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/033_minus_trueture.xi b/tests/pracownia2/error/033_minus_trueture.xi new file mode 100644 index 0000000..9798982 --- /dev/null +++ b/tests/pracownia2/error/033_minus_trueture.xi @@ -0,0 +1,7 @@ +f():bool +{ + return true - true +} + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/034_ifelse_copnd_boolA.xi b/tests/pracownia2/error/034_ifelse_copnd_boolA.xi new file mode 100644 index 0000000..5f31797 --- /dev/null +++ b/tests/pracownia2/error/034_ifelse_copnd_boolA.xi @@ -0,0 +1,8 @@ +test(x:bool[]) +{ + if x { + } else { + } +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/035_procedure_too_many_args_expect1.xi b/tests/pracownia2/error/035_procedure_too_many_args_expect1.xi new file mode 100644 index 0000000..a46d1be --- /dev/null +++ b/tests/pracownia2/error/035_procedure_too_many_args_expect1.xi @@ -0,0 +1,8 @@ +f(x:int) + +g() +{ + f(1, 2) +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/036_comp_lt_boolA.xi b/tests/pracownia2/error/036_comp_lt_boolA.xi new file mode 100644 index 0000000..c55d624 --- /dev/null +++ b/tests/pracownia2/error/036_comp_lt_boolA.xi @@ -0,0 +1,7 @@ +test(a:bool[], b:bool[]):bool +{ + return a < b +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/037_samedecl.xi b/tests/pracownia2/error/037_samedecl.xi new file mode 100644 index 0000000..323ef39 --- /dev/null +++ b/tests/pracownia2/error/037_samedecl.xi @@ -0,0 +1,6 @@ +f(x:int):bool + +f(x:int):bool + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/038_string_intAA.xi b/tests/pracownia2/error/038_string_intAA.xi new file mode 100644 index 0000000..55510e0 --- /dev/null +++ b/tests/pracownia2/error/038_string_intAA.xi @@ -0,0 +1,7 @@ +test() +{ + x:bool = "Polonia" +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/039_init_bool.xi b/tests/pracownia2/error/039_init_bool.xi new file mode 100644 index 0000000..52bbf58 --- /dev/null +++ b/tests/pracownia2/error/039_init_bool.xi @@ -0,0 +1,7 @@ +test() +{ + i:bool; + a:int[i]; +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/040_expected_2_given0.xi b/tests/pracownia2/error/040_expected_2_given0.xi new file mode 100644 index 0000000..1abe71d --- /dev/null +++ b/tests/pracownia2/error/040_expected_2_given0.xi @@ -0,0 +1,8 @@ +f() + +g() +{ + x:int, y:int = f() +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/041_comp_gt_boolA.xi b/tests/pracownia2/error/041_comp_gt_boolA.xi new file mode 100644 index 0000000..c22e76a --- /dev/null +++ b/tests/pracownia2/error/041_comp_gt_boolA.xi @@ -0,0 +1,7 @@ +test(a:int[], b:int[]):bool +{ + return a > b +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/042_init2_intA_fst.xi b/tests/pracownia2/error/042_init2_intA_fst.xi new file mode 100644 index 0000000..a28d54b --- /dev/null +++ b/tests/pracownia2/error/042_init2_intA_fst.xi @@ -0,0 +1,7 @@ +test() +{ + i:int[]; + a:int[i][42]; +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/043_init2_bool_snd.xi b/tests/pracownia2/error/043_init2_bool_snd.xi new file mode 100644 index 0000000..1c84359 --- /dev/null +++ b/tests/pracownia2/error/043_init2_bool_snd.xi @@ -0,0 +1,7 @@ +test() +{ + i:bool; + a:int[42][i]; +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/044_assign_curly_bool.xi b/tests/pracownia2/error/044_assign_curly_bool.xi new file mode 100644 index 0000000..dabe469 --- /dev/null +++ b/tests/pracownia2/error/044_assign_curly_bool.xi @@ -0,0 +1,7 @@ +test() +{ + i:bool; + i = {} +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/045_bool_index.xi b/tests/pracownia2/error/045_bool_index.xi new file mode 100644 index 0000000..17133eb --- /dev/null +++ b/tests/pracownia2/error/045_bool_index.xi @@ -0,0 +1,7 @@ +test(a:bool[]) +{ + i:bool; + a[i] = true; +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/046_length_as_bool.xi b/tests/pracownia2/error/046_length_as_bool.xi new file mode 100644 index 0000000..2bc404b --- /dev/null +++ b/tests/pracownia2/error/046_length_as_bool.xi @@ -0,0 +1,6 @@ +test(x:int[]):bool +{ + return length(x) +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/047_init2_boolA_fst.xi b/tests/pracownia2/error/047_init2_boolA_fst.xi new file mode 100644 index 0000000..b0c2284 --- /dev/null +++ b/tests/pracownia2/error/047_init2_boolA_fst.xi @@ -0,0 +1,7 @@ +test() +{ + i:bool[]; + a:int[i][42]; +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/048_false_intA.xi b/tests/pracownia2/error/048_false_intA.xi new file mode 100644 index 0000000..013da66 --- /dev/null +++ b/tests/pracownia2/error/048_false_intA.xi @@ -0,0 +1,7 @@ +test() +{ + x:int[] = false +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/049_shadowing_decl_return_more.xi b/tests/pracownia2/error/049_shadowing_decl_return_more.xi new file mode 100644 index 0000000..2c00290 --- /dev/null +++ b/tests/pracownia2/error/049_shadowing_decl_return_more.xi @@ -0,0 +1,5 @@ +f(x:int) : int +f(x:int) : int, int + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/050_function_missing_return_if_return.xi b/tests/pracownia2/error/050_function_missing_return_if_return.xi new file mode 100644 index 0000000..a909483 --- /dev/null +++ b/tests/pracownia2/error/050_function_missing_return_if_return.xi @@ -0,0 +1,8 @@ +f(x:bool):int +{ + if (x) { + return 0 + } +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/051_procedure_used_as_function_return.xi b/tests/pracownia2/error/051_procedure_used_as_function_return.xi new file mode 100644 index 0000000..71c3cf8 --- /dev/null +++ b/tests/pracownia2/error/051_procedure_used_as_function_return.xi @@ -0,0 +1,8 @@ +f() + +g():int +{ + return f() +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/052_function_missing_return.xi b/tests/pracownia2/error/052_function_missing_return.xi new file mode 100644 index 0000000..89ee185 --- /dev/null +++ b/tests/pracownia2/error/052_function_missing_return.xi @@ -0,0 +1,5 @@ +f():int +{ +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/053_multi_return_type_initialized_array_multidim.xi b/tests/pracownia2/error/053_multi_return_type_initialized_array_multidim.xi new file mode 100644 index 0000000..f2acaaa --- /dev/null +++ b/tests/pracownia2/error/053_multi_return_type_initialized_array_multidim.xi @@ -0,0 +1,4 @@ +test(): bool[], int[][42][], bool[][] + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/054_shadowing_decl_return_less.xi b/tests/pracownia2/error/054_shadowing_decl_return_less.xi new file mode 100644 index 0000000..992eb5a --- /dev/null +++ b/tests/pracownia2/error/054_shadowing_decl_return_less.xi @@ -0,0 +1,5 @@ +f(x:int) : int, int +f(x:int) : int + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/055_initialized_array.xi b/tests/pracownia2/error/055_initialized_array.xi new file mode 100644 index 0000000..027e9ba --- /dev/null +++ b/tests/pracownia2/error/055_initialized_array.xi @@ -0,0 +1,9 @@ +producer(): int[], bool + +test() +{ + x:int[30], y:bool = producer() +} + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/056_false_int.xi b/tests/pracownia2/error/056_false_int.xi new file mode 100644 index 0000000..76b0bc2 --- /dev/null +++ b/tests/pracownia2/error/056_false_int.xi @@ -0,0 +1,7 @@ +test() +{ + x:int = false +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/057_false_boolA.xi b/tests/pracownia2/error/057_false_boolA.xi new file mode 100644 index 0000000..cdc3abd --- /dev/null +++ b/tests/pracownia2/error/057_false_boolA.xi @@ -0,0 +1,7 @@ +test() +{ + x:bool[] = false +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/058_formal_pars_def.xi b/tests/pracownia2/error/058_formal_pars_def.xi new file mode 100644 index 0000000..d09234e --- /dev/null +++ b/tests/pracownia2/error/058_formal_pars_def.xi @@ -0,0 +1,6 @@ +test(x:int, x:int, y:bool) +{ +} + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/059_char_bool.xi b/tests/pracownia2/error/059_char_bool.xi new file mode 100644 index 0000000..51a1712 --- /dev/null +++ b/tests/pracownia2/error/059_char_bool.xi @@ -0,0 +1,7 @@ +test() +{ + x:bool = 'X' +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/060_procedure_too_less_args_expect2.xi b/tests/pracownia2/error/060_procedure_too_less_args_expect2.xi new file mode 100644 index 0000000..0eb163d --- /dev/null +++ b/tests/pracownia2/error/060_procedure_too_less_args_expect2.xi @@ -0,0 +1,8 @@ +f(x:int, y:int) + +g() +{ + f(1) +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/061_while_cond_int.xi b/tests/pracownia2/error/061_while_cond_int.xi new file mode 100644 index 0000000..f6ef07b --- /dev/null +++ b/tests/pracownia2/error/061_while_cond_int.xi @@ -0,0 +1,7 @@ +test(x:int) +{ + while x { + } +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/062_shadowing_decl_less_fpars.xi b/tests/pracownia2/error/062_shadowing_decl_less_fpars.xi new file mode 100644 index 0000000..ad85289 --- /dev/null +++ b/tests/pracownia2/error/062_shadowing_decl_less_fpars.xi @@ -0,0 +1,5 @@ +f(x:int, y:int) +f(x:int) + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/063_comp_lt_bool.xi b/tests/pracownia2/error/063_comp_lt_bool.xi new file mode 100644 index 0000000..d4d45f1 --- /dev/null +++ b/tests/pracownia2/error/063_comp_lt_bool.xi @@ -0,0 +1,7 @@ +test(a:bool, b:bool):bool +{ + return a < b +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/064_procedure_used_as_function_ifelsecond.xi b/tests/pracownia2/error/064_procedure_used_as_function_ifelsecond.xi new file mode 100644 index 0000000..73a9b2a --- /dev/null +++ b/tests/pracownia2/error/064_procedure_used_as_function_ifelsecond.xi @@ -0,0 +1,10 @@ +f() + +g() +{ + if f() { + } else { + } +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/065_comp_ge_boolA.xi b/tests/pracownia2/error/065_comp_ge_boolA.xi new file mode 100644 index 0000000..1e468b5 --- /dev/null +++ b/tests/pracownia2/error/065_comp_ge_boolA.xi @@ -0,0 +1,7 @@ +test(a:int[], b:int[]):bool +{ + return a >= b +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/066_initsize_wrong_place.xi b/tests/pracownia2/error/066_initsize_wrong_place.xi new file mode 100644 index 0000000..80bbbb2 --- /dev/null +++ b/tests/pracownia2/error/066_initsize_wrong_place.xi @@ -0,0 +1,6 @@ +test() +{ + a:int[][42]; +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/067_comp_ge_boolA.xi b/tests/pracownia2/error/067_comp_ge_boolA.xi new file mode 100644 index 0000000..9e8fc52 --- /dev/null +++ b/tests/pracownia2/error/067_comp_ge_boolA.xi @@ -0,0 +1,7 @@ +test(a:bool[], b:bool[]):bool +{ + return a >= b +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/068_formal_pars_decl_other_type.xi b/tests/pracownia2/error/068_formal_pars_decl_other_type.xi new file mode 100644 index 0000000..79cc8e2 --- /dev/null +++ b/tests/pracownia2/error/068_formal_pars_decl_other_type.xi @@ -0,0 +1,4 @@ +test(x:int, x:int[], y:bool) + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/069_int_bool.xi b/tests/pracownia2/error/069_int_bool.xi new file mode 100644 index 0000000..5a2c456 --- /dev/null +++ b/tests/pracownia2/error/069_int_bool.xi @@ -0,0 +1,7 @@ +test() +{ + x:bool = 42 +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/070_char_boolA.xi b/tests/pracownia2/error/070_char_boolA.xi new file mode 100644 index 0000000..9eab250 --- /dev/null +++ b/tests/pracownia2/error/070_char_boolA.xi @@ -0,0 +1,7 @@ +test() +{ + x:bool[] = 'X' +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/071_procedure_used_as_function_whilecond.xi b/tests/pracownia2/error/071_procedure_used_as_function_whilecond.xi new file mode 100644 index 0000000..d60f7b6 --- /dev/null +++ b/tests/pracownia2/error/071_procedure_used_as_function_whilecond.xi @@ -0,0 +1,9 @@ +f() + +g() +{ + while f() { + } +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/072_if_cond_int.xi b/tests/pracownia2/error/072_if_cond_int.xi new file mode 100644 index 0000000..8822d65 --- /dev/null +++ b/tests/pracownia2/error/072_if_cond_int.xi @@ -0,0 +1,7 @@ +test(x:int) +{ + if x { + } +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/073_comp_le_boolA.xi b/tests/pracownia2/error/073_comp_le_boolA.xi new file mode 100644 index 0000000..83674a0 --- /dev/null +++ b/tests/pracownia2/error/073_comp_le_boolA.xi @@ -0,0 +1,7 @@ +test(a:int[], b:int[]):bool +{ + return a < b +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/074_expecting2_given1.xi b/tests/pracownia2/error/074_expecting2_given1.xi new file mode 100644 index 0000000..594aff7 --- /dev/null +++ b/tests/pracownia2/error/074_expecting2_given1.xi @@ -0,0 +1,6 @@ +f():int,int +{ + return 1 +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/075_shadowing_decl_return_type.xi b/tests/pracownia2/error/075_shadowing_decl_return_type.xi new file mode 100644 index 0000000..42ebd02 --- /dev/null +++ b/tests/pracownia2/error/075_shadowing_decl_return_type.xi @@ -0,0 +1,5 @@ +f(x:int) : int +f(x:int) : bool + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/076_intA_index.xi b/tests/pracownia2/error/076_intA_index.xi new file mode 100644 index 0000000..cc43ec4 --- /dev/null +++ b/tests/pracownia2/error/076_intA_index.xi @@ -0,0 +1,7 @@ +test(a:int[]) +{ + i:int[]; + a[i] = 1; +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/077_procedure_too_many_args_expect0.xi b/tests/pracownia2/error/077_procedure_too_many_args_expect0.xi new file mode 100644 index 0000000..dec5d8f --- /dev/null +++ b/tests/pracownia2/error/077_procedure_too_many_args_expect0.xi @@ -0,0 +1,8 @@ +f() + +g() +{ + f(1, 2) +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/078_true_int.xi b/tests/pracownia2/error/078_true_int.xi new file mode 100644 index 0000000..4ee78d7 --- /dev/null +++ b/tests/pracownia2/error/078_true_int.xi @@ -0,0 +1,7 @@ +test() +{ + x:int = true +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/079_comp_gt_boolA_intA.xi b/tests/pracownia2/error/079_comp_gt_boolA_intA.xi new file mode 100644 index 0000000..de19bee --- /dev/null +++ b/tests/pracownia2/error/079_comp_gt_boolA_intA.xi @@ -0,0 +1,7 @@ +test(a:bool[], b:int[]):bool +{ + return a > b +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/080_int_intA.xi b/tests/pracownia2/error/080_int_intA.xi new file mode 100644 index 0000000..7569fe3 --- /dev/null +++ b/tests/pracownia2/error/080_int_intA.xi @@ -0,0 +1,7 @@ +test() +{ + x:int[] = 42 +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/081_procedure_too_less_args_expect1.xi b/tests/pracownia2/error/081_procedure_too_less_args_expect1.xi new file mode 100644 index 0000000..0931f48 --- /dev/null +++ b/tests/pracownia2/error/081_procedure_too_less_args_expect1.xi @@ -0,0 +1,8 @@ +f(x:int) + +g() +{ + f() +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/082_function_missing_return_while_return.xi b/tests/pracownia2/error/082_function_missing_return_while_return.xi new file mode 100644 index 0000000..b7dd972 --- /dev/null +++ b/tests/pracownia2/error/082_function_missing_return_while_return.xi @@ -0,0 +1,8 @@ +f(x:bool):int +{ + while x { + return 0 + } +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/083_shadowing_decl_other_fpartype.xi b/tests/pracownia2/error/083_shadowing_decl_other_fpartype.xi new file mode 100644 index 0000000..fbd8682 --- /dev/null +++ b/tests/pracownia2/error/083_shadowing_decl_other_fpartype.xi @@ -0,0 +1,5 @@ +f(x:int) +f(x:bool) + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/084_init2_boolA_snd.xi b/tests/pracownia2/error/084_init2_boolA_snd.xi new file mode 100644 index 0000000..ce9aac3 --- /dev/null +++ b/tests/pracownia2/error/084_init2_boolA_snd.xi @@ -0,0 +1,7 @@ +test() +{ + i:bool[]; + a:int[42][i]; +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/085_expecting2_given_proc.xi b/tests/pracownia2/error/085_expecting2_given_proc.xi new file mode 100644 index 0000000..d39d103 --- /dev/null +++ b/tests/pracownia2/error/085_expecting2_given_proc.xi @@ -0,0 +1,8 @@ +g() + +f():int,int +{ + return g() +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/086_function_missing_return_ifelse_then_return.xi b/tests/pracownia2/error/086_function_missing_return_ifelse_then_return.xi new file mode 100644 index 0000000..df596c5 --- /dev/null +++ b/tests/pracownia2/error/086_function_missing_return_ifelse_then_return.xi @@ -0,0 +1,9 @@ +f(x:bool):int +{ + if (x) { + return 0 + } else { + } +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/087_comp_ge_bool.xi b/tests/pracownia2/error/087_comp_ge_bool.xi new file mode 100644 index 0000000..ecf351f --- /dev/null +++ b/tests/pracownia2/error/087_comp_ge_bool.xi @@ -0,0 +1,7 @@ +test(a:bool, b:bool):bool +{ + return a >= b +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/088_init2_intA_fst_only.xi b/tests/pracownia2/error/088_init2_intA_fst_only.xi new file mode 100644 index 0000000..ba1bb06 --- /dev/null +++ b/tests/pracownia2/error/088_init2_intA_fst_only.xi @@ -0,0 +1,7 @@ +test() +{ + i:int[]; + a:int[i][]; +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/089_comp_le_boolA_intA.xi b/tests/pracownia2/error/089_comp_le_boolA_intA.xi new file mode 100644 index 0000000..631bed1 --- /dev/null +++ b/tests/pracownia2/error/089_comp_le_boolA_intA.xi @@ -0,0 +1,7 @@ +test(a:bool[], b:int[]):bool +{ + return a < b +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/090_expected_2_given3_joker.xi b/tests/pracownia2/error/090_expected_2_given3_joker.xi new file mode 100644 index 0000000..47373fa --- /dev/null +++ b/tests/pracownia2/error/090_expected_2_given3_joker.xi @@ -0,0 +1,8 @@ +f(): int, int, int + +g() +{ + x:int, _ = f() +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/091_function_missing_return_while_simple.xi b/tests/pracownia2/error/091_function_missing_return_while_simple.xi new file mode 100644 index 0000000..0e3743f --- /dev/null +++ b/tests/pracownia2/error/091_function_missing_return_while_simple.xi @@ -0,0 +1,7 @@ +f(x:bool):int +{ + while x { + } +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/092_expected_2_given1.xi b/tests/pracownia2/error/092_expected_2_given1.xi new file mode 100644 index 0000000..f923012 --- /dev/null +++ b/tests/pracownia2/error/092_expected_2_given1.xi @@ -0,0 +1,8 @@ +f(): int + +g() +{ + x:int, y:int = f() +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/093_init2_intA_snd.xi b/tests/pracownia2/error/093_init2_intA_snd.xi new file mode 100644 index 0000000..6a82e3b --- /dev/null +++ b/tests/pracownia2/error/093_init2_intA_snd.xi @@ -0,0 +1,7 @@ +test() +{ + i:int[]; + a:int[42][i]; +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/094_while_cond_boolA.xi b/tests/pracownia2/error/094_while_cond_boolA.xi new file mode 100644 index 0000000..47cde1a --- /dev/null +++ b/tests/pracownia2/error/094_while_cond_boolA.xi @@ -0,0 +1,7 @@ +test(x:bool[]) +{ + while x { + } +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/095_mult_trueture.xi b/tests/pracownia2/error/095_mult_trueture.xi new file mode 100644 index 0000000..9798982 --- /dev/null +++ b/tests/pracownia2/error/095_mult_trueture.xi @@ -0,0 +1,7 @@ +f():bool +{ + return true - true +} + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/096_procedure_used_in_return_in_procedure.xi b/tests/pracownia2/error/096_procedure_used_in_return_in_procedure.xi new file mode 100644 index 0000000..1f78f7f --- /dev/null +++ b/tests/pracownia2/error/096_procedure_used_in_return_in_procedure.xi @@ -0,0 +1,9 @@ +f() + +g() +{ + return f() +} + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/097_init2_bool_fst_only.xi b/tests/pracownia2/error/097_init2_bool_fst_only.xi new file mode 100644 index 0000000..6ee7634 --- /dev/null +++ b/tests/pracownia2/error/097_init2_bool_fst_only.xi @@ -0,0 +1,7 @@ +test() +{ + i:bool; + a:int[i][]; +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/098_true_boolA.xi b/tests/pracownia2/error/098_true_boolA.xi new file mode 100644 index 0000000..eff0d8d --- /dev/null +++ b/tests/pracownia2/error/098_true_boolA.xi @@ -0,0 +1,7 @@ +test() +{ + x:bool[] = true +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/099_variables_nested_scope.xi b/tests/pracownia2/error/099_variables_nested_scope.xi new file mode 100644 index 0000000..b863101 --- /dev/null +++ b/tests/pracownia2/error/099_variables_nested_scope.xi @@ -0,0 +1,9 @@ +test() +{ + x:int + { + x:bool + } +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/100_string_int.xi b/tests/pracownia2/error/100_string_int.xi new file mode 100644 index 0000000..cc048d4 --- /dev/null +++ b/tests/pracownia2/error/100_string_int.xi @@ -0,0 +1,7 @@ +test() +{ + x:int = "Polonia" +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/101_init_intA.xi b/tests/pracownia2/error/101_init_intA.xi new file mode 100644 index 0000000..1d0823f --- /dev/null +++ b/tests/pracownia2/error/101_init_intA.xi @@ -0,0 +1,7 @@ +test() +{ + i:int[]; + a:int[i]; +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/102_ifelse_cond_int.xi b/tests/pracownia2/error/102_ifelse_cond_int.xi new file mode 100644 index 0000000..8822d65 --- /dev/null +++ b/tests/pracownia2/error/102_ifelse_cond_int.xi @@ -0,0 +1,7 @@ +test(x:int) +{ + if x { + } +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/103_comp_gt_boolA.xi b/tests/pracownia2/error/103_comp_gt_boolA.xi new file mode 100644 index 0000000..db28717 --- /dev/null +++ b/tests/pracownia2/error/103_comp_gt_boolA.xi @@ -0,0 +1,7 @@ +test(a:bool[], b:bool[]):bool +{ + return a > b +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/104_plus_trueture.xi b/tests/pracownia2/error/104_plus_trueture.xi new file mode 100644 index 0000000..44ddced --- /dev/null +++ b/tests/pracownia2/error/104_plus_trueture.xi @@ -0,0 +1,7 @@ +f():bool +{ + return true + true +} + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/105_true_intA.xi b/tests/pracownia2/error/105_true_intA.xi new file mode 100644 index 0000000..3db313a --- /dev/null +++ b/tests/pracownia2/error/105_true_intA.xi @@ -0,0 +1,7 @@ +test() +{ + x:int[] = true +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/106_length_as_intA.xi b/tests/pracownia2/error/106_length_as_intA.xi new file mode 100644 index 0000000..7d29ad2 --- /dev/null +++ b/tests/pracownia2/error/106_length_as_intA.xi @@ -0,0 +1,6 @@ +test(x:int[]):int[] +{ + return length(x) +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/107_variables_nested_scope_ifelse.xi b/tests/pracownia2/error/107_variables_nested_scope_ifelse.xi new file mode 100644 index 0000000..a7b0cb6 --- /dev/null +++ b/tests/pracownia2/error/107_variables_nested_scope_ifelse.xi @@ -0,0 +1,10 @@ +test() +{ + x:int + if true { + } else { + x:bool + } +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/108_bool_as_A_from_A.xi b/tests/pracownia2/error/108_bool_as_A_from_A.xi new file mode 100644 index 0000000..15c1e4b --- /dev/null +++ b/tests/pracownia2/error/108_bool_as_A_from_A.xi @@ -0,0 +1,6 @@ +test(x:bool[]) +{ + x[0][0] = true; +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/109_return_type_initialized_array.xi b/tests/pracownia2/error/109_return_type_initialized_array.xi new file mode 100644 index 0000000..29b7141 --- /dev/null +++ b/tests/pracownia2/error/109_return_type_initialized_array.xi @@ -0,0 +1,4 @@ +test():int[42] + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/110_expecting2_given3.xi b/tests/pracownia2/error/110_expecting2_given3.xi new file mode 100644 index 0000000..306595d --- /dev/null +++ b/tests/pracownia2/error/110_expecting2_given3.xi @@ -0,0 +1,6 @@ +f():int,int +{ + return 1,2,3 +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/111_variables_nested_scope_while.xi b/tests/pracownia2/error/111_variables_nested_scope_while.xi new file mode 100644 index 0000000..b0d1936 --- /dev/null +++ b/tests/pracownia2/error/111_variables_nested_scope_while.xi @@ -0,0 +1,9 @@ +test() +{ + x:int + while true { + x:bool + } +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/112_comp_lt_intA_boolA.xi b/tests/pracownia2/error/112_comp_lt_intA_boolA.xi new file mode 100644 index 0000000..333e826 --- /dev/null +++ b/tests/pracownia2/error/112_comp_lt_intA_boolA.xi @@ -0,0 +1,7 @@ +test(a:int[], b:bool[]):bool +{ + return a < b +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/113_missing_multireturn.xi b/tests/pracownia2/error/113_missing_multireturn.xi new file mode 100644 index 0000000..c2262f9 --- /dev/null +++ b/tests/pracownia2/error/113_missing_multireturn.xi @@ -0,0 +1,5 @@ +f():int,int +{ +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/114_return_multireturn_func_not_allowed.xi b/tests/pracownia2/error/114_return_multireturn_func_not_allowed.xi new file mode 100644 index 0000000..07345d9 --- /dev/null +++ b/tests/pracownia2/error/114_return_multireturn_func_not_allowed.xi @@ -0,0 +1,8 @@ +g():int,int + +f():int,int +{ + return g() +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/115_expecting2_given0.xi b/tests/pracownia2/error/115_expecting2_given0.xi new file mode 100644 index 0000000..b773933 --- /dev/null +++ b/tests/pracownia2/error/115_expecting2_given0.xi @@ -0,0 +1,6 @@ +f():int,int +{ + return +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/116_length_int.xi b/tests/pracownia2/error/116_length_int.xi new file mode 100644 index 0000000..b491aa1 --- /dev/null +++ b/tests/pracownia2/error/116_length_int.xi @@ -0,0 +1,6 @@ +test(x:int):int +{ + return length(x) +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/117_comp_le_boolA.xi b/tests/pracownia2/error/117_comp_le_boolA.xi new file mode 100644 index 0000000..c55d624 --- /dev/null +++ b/tests/pracownia2/error/117_comp_le_boolA.xi @@ -0,0 +1,7 @@ +test(a:bool[], b:bool[]):bool +{ + return a < b +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/118_variables_nested_scope_if.xi b/tests/pracownia2/error/118_variables_nested_scope_if.xi new file mode 100644 index 0000000..655caa9 --- /dev/null +++ b/tests/pracownia2/error/118_variables_nested_scope_if.xi @@ -0,0 +1,9 @@ +test() +{ + x:int + if true { + x:bool + } +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/119_comp_lt_boolA_intA.xi b/tests/pracownia2/error/119_comp_lt_boolA_intA.xi new file mode 100644 index 0000000..631bed1 --- /dev/null +++ b/tests/pracownia2/error/119_comp_lt_boolA_intA.xi @@ -0,0 +1,7 @@ +test(a:bool[], b:int[]):bool +{ + return a < b +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/120_formal_pars_def_other_type.xi b/tests/pracownia2/error/120_formal_pars_def_other_type.xi new file mode 100644 index 0000000..f9dcade --- /dev/null +++ b/tests/pracownia2/error/120_formal_pars_def_other_type.xi @@ -0,0 +1,6 @@ +test(x:int, x:int[], y:bool) +{ +} + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/121_comp_ge_boolA_intA.xi b/tests/pracownia2/error/121_comp_ge_boolA_intA.xi new file mode 100644 index 0000000..a112dd5 --- /dev/null +++ b/tests/pracownia2/error/121_comp_ge_boolA_intA.xi @@ -0,0 +1,7 @@ +test(a:bool[], b:int[]):bool +{ + return a >= b +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/122_init_boolA.xi b/tests/pracownia2/error/122_init_boolA.xi new file mode 100644 index 0000000..4a3f027 --- /dev/null +++ b/tests/pracownia2/error/122_init_boolA.xi @@ -0,0 +1,7 @@ +test() +{ + i:bool[]; + a:int[i]; +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/123_comp_ge_intA_boolA.xi b/tests/pracownia2/error/123_comp_ge_intA_boolA.xi new file mode 100644 index 0000000..a6b066e --- /dev/null +++ b/tests/pracownia2/error/123_comp_ge_intA_boolA.xi @@ -0,0 +1,7 @@ +test(a:int[], b:bool[]):bool +{ + return a >= b +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/124_init2_bool_fst.xi b/tests/pracownia2/error/124_init2_bool_fst.xi new file mode 100644 index 0000000..462eeee --- /dev/null +++ b/tests/pracownia2/error/124_init2_bool_fst.xi @@ -0,0 +1,7 @@ +test() +{ + i:bool; + a:int[i][42]; +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/125_expected_2_given0_joker.xi b/tests/pracownia2/error/125_expected_2_given0_joker.xi new file mode 100644 index 0000000..96a8e35 --- /dev/null +++ b/tests/pracownia2/error/125_expected_2_given0_joker.xi @@ -0,0 +1,8 @@ +f() + +g() +{ + x:int, _ = f() +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/126_return_type_initialized_array_multidim.xi b/tests/pracownia2/error/126_return_type_initialized_array_multidim.xi new file mode 100644 index 0000000..0dfa847 --- /dev/null +++ b/tests/pracownia2/error/126_return_type_initialized_array_multidim.xi @@ -0,0 +1,4 @@ +test():int[][42][] + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/127_formal_arg_initialized_array_multidim.xi b/tests/pracownia2/error/127_formal_arg_initialized_array_multidim.xi new file mode 100644 index 0000000..053528f --- /dev/null +++ b/tests/pracownia2/error/127_formal_arg_initialized_array_multidim.xi @@ -0,0 +1,5 @@ +test(x:int[][43][]) +{ +} +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/128_div_trueture.xi b/tests/pracownia2/error/128_div_trueture.xi new file mode 100644 index 0000000..1f0da71 --- /dev/null +++ b/tests/pracownia2/error/128_div_trueture.xi @@ -0,0 +1,7 @@ +f():bool +{ + return true / true +} + +//@PRACOWNIA +//@should_not_typecheck diff --git a/tests/pracownia2/error/129_string_bool.xi b/tests/pracownia2/error/129_string_bool.xi new file mode 100644 index 0000000..c983fc4 --- /dev/null +++ b/tests/pracownia2/error/129_string_bool.xi @@ -0,0 +1,7 @@ +test() +{ + x:bool[] = "Polonia" +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/130_comp_lt_boolA.xi b/tests/pracownia2/error/130_comp_lt_boolA.xi new file mode 100644 index 0000000..83674a0 --- /dev/null +++ b/tests/pracownia2/error/130_comp_lt_boolA.xi @@ -0,0 +1,7 @@ +test(a:int[], b:int[]):bool +{ + return a < b +} +//@PRACOWNIA +//@stop_after typechecker +//@should_not_typecheck diff --git a/tests/pracownia2/error/131_variables_same_scope.xi b/tests/pracownia2/error/131_variables_same_scope.xi new file mode 100644 index 0000000..8cdf9e3 --- /dev/null +++ b/tests/pracownia2/error/131_variables_same_scope.xi @@ -0,0 +1,7 @@ +test() +{ + x:int + x:bool +} +//@PRACOWNIA +//@should_not_typecheck |