From 62233d2920efacb3dd8bf94c26b640db9603d9e0 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Tue, 29 Aug 2023 00:37:20 +0530 Subject: [PATCH] TEST: Update reference tests --- tests/reference/asr-arrays_03-de2e952.json | 13 +++++++++++++ tests/reference/asr-arrays_03-de2e952.stderr | 5 +++++ tests/reference/asr-arrays_04-880407c.json | 13 +++++++++++++ tests/reference/asr-arrays_04-880407c.stderr | 5 +++++ tests/reference/asr-arrays_05-ec8fbd5.json | 13 +++++++++++++ tests/reference/asr-arrays_05-ec8fbd5.stderr | 5 +++++ tests/reference/asr-arrays_06-fbb09a3.json | 13 +++++++++++++ tests/reference/asr-arrays_06-fbb09a3.stderr | 5 +++++ tests/reference/asr-arrays_07-de430fd.json | 13 +++++++++++++ tests/reference/asr-arrays_07-de430fd.stderr | 5 +++++ tests/reference/asr-arrays_08-ba317a3.json | 13 +++++++++++++ tests/reference/asr-arrays_08-ba317a3.stderr | 5 +++++ tests/reference/asr-arrays_09-50ee586.json | 13 +++++++++++++ tests/reference/asr-arrays_09-50ee586.stderr | 5 +++++ tests/reference/asr-arrays_10-bc82d75.json | 13 +++++++++++++ tests/reference/asr-arrays_10-bc82d75.stderr | 5 +++++ tests/reference/asr-arrays_11-fc505b4.json | 13 +++++++++++++ tests/reference/asr-arrays_11-fc505b4.stderr | 5 +++++ tests/reference/asr-arrays_12-63d6f25.json | 13 +++++++++++++ tests/reference/asr-arrays_12-63d6f25.stderr | 5 +++++ tests/reference/asr-arrays_13-b5fcc7e.json | 13 +++++++++++++ tests/reference/asr-arrays_13-b5fcc7e.stderr | 5 +++++ tests/reference/asr-arrays_14-78be00e.json | 13 +++++++++++++ tests/reference/asr-arrays_14-78be00e.stderr | 5 +++++ 24 files changed, 216 insertions(+) create mode 100644 tests/reference/asr-arrays_03-de2e952.json create mode 100644 tests/reference/asr-arrays_03-de2e952.stderr create mode 100644 tests/reference/asr-arrays_04-880407c.json create mode 100644 tests/reference/asr-arrays_04-880407c.stderr create mode 100644 tests/reference/asr-arrays_05-ec8fbd5.json create mode 100644 tests/reference/asr-arrays_05-ec8fbd5.stderr create mode 100644 tests/reference/asr-arrays_06-fbb09a3.json create mode 100644 tests/reference/asr-arrays_06-fbb09a3.stderr create mode 100644 tests/reference/asr-arrays_07-de430fd.json create mode 100644 tests/reference/asr-arrays_07-de430fd.stderr create mode 100644 tests/reference/asr-arrays_08-ba317a3.json create mode 100644 tests/reference/asr-arrays_08-ba317a3.stderr create mode 100644 tests/reference/asr-arrays_09-50ee586.json create mode 100644 tests/reference/asr-arrays_09-50ee586.stderr create mode 100644 tests/reference/asr-arrays_10-bc82d75.json create mode 100644 tests/reference/asr-arrays_10-bc82d75.stderr create mode 100644 tests/reference/asr-arrays_11-fc505b4.json create mode 100644 tests/reference/asr-arrays_11-fc505b4.stderr create mode 100644 tests/reference/asr-arrays_12-63d6f25.json create mode 100644 tests/reference/asr-arrays_12-63d6f25.stderr create mode 100644 tests/reference/asr-arrays_13-b5fcc7e.json create mode 100644 tests/reference/asr-arrays_13-b5fcc7e.stderr create mode 100644 tests/reference/asr-arrays_14-78be00e.json create mode 100644 tests/reference/asr-arrays_14-78be00e.stderr diff --git a/tests/reference/asr-arrays_03-de2e952.json b/tests/reference/asr-arrays_03-de2e952.json new file mode 100644 index 0000000000..1583b11b63 --- /dev/null +++ b/tests/reference/asr-arrays_03-de2e952.json @@ -0,0 +1,13 @@ +{ + "basename": "asr-arrays_03-de2e952", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", + "infile": "tests/errors/arrays_03.py", + "infile_hash": "429c486d84e37401f89fe1e678039ae0e16b2cf5bf13417767160858", + "outfile": null, + "outfile_hash": null, + "stdout": null, + "stdout_hash": null, + "stderr": "asr-arrays_03-de2e952.stderr", + "stderr_hash": "4c932f31bbb10c9ba8d8d75be226ba9c33553be3bcb367c8112e31af", + "returncode": 2 +} \ No newline at end of file diff --git a/tests/reference/asr-arrays_03-de2e952.stderr b/tests/reference/asr-arrays_03-de2e952.stderr new file mode 100644 index 0000000000..1fb5635502 --- /dev/null +++ b/tests/reference/asr-arrays_03-de2e952.stderr @@ -0,0 +1,5 @@ +semantic error: Type mismatch in annotation-assignment, the types must be compatible + --> tests/errors/arrays_03.py:6:5 + | +6 | x: i16[4] = empty([5], dtype=int16) + | ^ ^^^^^^^^^^^^^^^^^^^^^^^ type mismatch ('i16[4]' and 'i16[5]') diff --git a/tests/reference/asr-arrays_04-880407c.json b/tests/reference/asr-arrays_04-880407c.json new file mode 100644 index 0000000000..1c5077a22c --- /dev/null +++ b/tests/reference/asr-arrays_04-880407c.json @@ -0,0 +1,13 @@ +{ + "basename": "asr-arrays_04-880407c", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", + "infile": "tests/errors/arrays_04.py", + "infile_hash": "9dfe40ad5fd610b75685a45ffd700ff14e263738dd5ba968952d7874", + "outfile": null, + "outfile_hash": null, + "stdout": null, + "stdout_hash": null, + "stderr": "asr-arrays_04-880407c.stderr", + "stderr_hash": "10ef155b0236096d5de8157e38b3989d99343b016a8153b68a36aa54", + "returncode": 2 +} \ No newline at end of file diff --git a/tests/reference/asr-arrays_04-880407c.stderr b/tests/reference/asr-arrays_04-880407c.stderr new file mode 100644 index 0000000000..5cb27a1cb7 --- /dev/null +++ b/tests/reference/asr-arrays_04-880407c.stderr @@ -0,0 +1,5 @@ +semantic error: Type mismatch in annotation-assignment, the types must be compatible + --> tests/errors/arrays_04.py:6:5 + | +6 | x: i16[5] = empty([5], dtype=int32) + | ^ ^^^^^^^^^^^^^^^^^^^^^^^ type mismatch ('i16[5]' and 'i32[5]') diff --git a/tests/reference/asr-arrays_05-ec8fbd5.json b/tests/reference/asr-arrays_05-ec8fbd5.json new file mode 100644 index 0000000000..695a74d7a7 --- /dev/null +++ b/tests/reference/asr-arrays_05-ec8fbd5.json @@ -0,0 +1,13 @@ +{ + "basename": "asr-arrays_05-ec8fbd5", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", + "infile": "tests/errors/arrays_05.py", + "infile_hash": "c525449694f73038495a6bd8fded408301f43d18b1c387765b92b792", + "outfile": null, + "outfile_hash": null, + "stdout": null, + "stdout_hash": null, + "stderr": "asr-arrays_05-ec8fbd5.stderr", + "stderr_hash": "b92b252106c95d1851599993abbedd755f2b3231f5b551b3af33b67e", + "returncode": 2 +} \ No newline at end of file diff --git a/tests/reference/asr-arrays_05-ec8fbd5.stderr b/tests/reference/asr-arrays_05-ec8fbd5.stderr new file mode 100644 index 0000000000..453518d819 --- /dev/null +++ b/tests/reference/asr-arrays_05-ec8fbd5.stderr @@ -0,0 +1,5 @@ +semantic error: Type mismatch in annotation-assignment, the types must be compatible + --> tests/errors/arrays_05.py:6:5 + | +6 | x: i16[5, 4] = empty([5, 3], dtype=int16) + | ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch ('i16[5][4]' and 'i16[5][3]') diff --git a/tests/reference/asr-arrays_06-fbb09a3.json b/tests/reference/asr-arrays_06-fbb09a3.json new file mode 100644 index 0000000000..c286109174 --- /dev/null +++ b/tests/reference/asr-arrays_06-fbb09a3.json @@ -0,0 +1,13 @@ +{ + "basename": "asr-arrays_06-fbb09a3", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", + "infile": "tests/errors/arrays_06.py", + "infile_hash": "670cbcac5e942bae5293cd94090bab65a2039384d71fb8be4c6db5a1", + "outfile": null, + "outfile_hash": null, + "stdout": null, + "stdout_hash": null, + "stderr": "asr-arrays_06-fbb09a3.stderr", + "stderr_hash": "0cd2825fa152a45c868b7f54832a95d0f457be296143f28ce1909870", + "returncode": 2 +} \ No newline at end of file diff --git a/tests/reference/asr-arrays_06-fbb09a3.stderr b/tests/reference/asr-arrays_06-fbb09a3.stderr new file mode 100644 index 0000000000..e3cc3fea78 --- /dev/null +++ b/tests/reference/asr-arrays_06-fbb09a3.stderr @@ -0,0 +1,5 @@ +semantic error: Type mismatch in annotation-assignment, the types must be compatible + --> tests/errors/arrays_06.py:6:5 + | +6 | x: i16[5, 4] = empty([5, 4], dtype=int32) + | ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch ('i16[5][4]' and 'i32[5][4]') diff --git a/tests/reference/asr-arrays_07-de430fd.json b/tests/reference/asr-arrays_07-de430fd.json new file mode 100644 index 0000000000..6218500661 --- /dev/null +++ b/tests/reference/asr-arrays_07-de430fd.json @@ -0,0 +1,13 @@ +{ + "basename": "asr-arrays_07-de430fd", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", + "infile": "tests/errors/arrays_07.py", + "infile_hash": "efe8b3c4a474aca55cb8a537a3ea2cd30eb5d5abf140d8c2c0b9e3f4", + "outfile": null, + "outfile_hash": null, + "stdout": null, + "stdout_hash": null, + "stderr": "asr-arrays_07-de430fd.stderr", + "stderr_hash": "ea9cadd25ae52d3ff115925e4f8e6feb278ad009410d64c940cf64ff", + "returncode": 2 +} \ No newline at end of file diff --git a/tests/reference/asr-arrays_07-de430fd.stderr b/tests/reference/asr-arrays_07-de430fd.stderr new file mode 100644 index 0000000000..e4846db907 --- /dev/null +++ b/tests/reference/asr-arrays_07-de430fd.stderr @@ -0,0 +1,5 @@ +semantic error: Type mismatch in annotation-assignment, the types must be compatible + --> tests/errors/arrays_07.py:6:5 + | +6 | x: f32[5, 4] = empty([5, 4], dtype=complex64) + | ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch ('f32[5][4]' and 'c32[5][4]') diff --git a/tests/reference/asr-arrays_08-ba317a3.json b/tests/reference/asr-arrays_08-ba317a3.json new file mode 100644 index 0000000000..5adc25d3f3 --- /dev/null +++ b/tests/reference/asr-arrays_08-ba317a3.json @@ -0,0 +1,13 @@ +{ + "basename": "asr-arrays_08-ba317a3", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", + "infile": "tests/errors/arrays_08.py", + "infile_hash": "3f7a5a8889301df17222a777f7e92a5667097ffca9ac4d275ccb310f", + "outfile": null, + "outfile_hash": null, + "stdout": null, + "stdout_hash": null, + "stderr": "asr-arrays_08-ba317a3.stderr", + "stderr_hash": "a6fc0e1c661fab5e3ee0a034abb85d765a1dce515483a2a6191b2aa7", + "returncode": 2 +} \ No newline at end of file diff --git a/tests/reference/asr-arrays_08-ba317a3.stderr b/tests/reference/asr-arrays_08-ba317a3.stderr new file mode 100644 index 0000000000..17d804e01d --- /dev/null +++ b/tests/reference/asr-arrays_08-ba317a3.stderr @@ -0,0 +1,5 @@ +semantic error: Type mismatch in annotation-assignment, the types must be compatible + --> tests/errors/arrays_08.py:9:5 + | +9 | x: i64[p, q, r] = empty([q, p, r], dtype=int64) + | ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch ('i64[100][120][200]' and 'i64[120][100][200]') diff --git a/tests/reference/asr-arrays_09-50ee586.json b/tests/reference/asr-arrays_09-50ee586.json new file mode 100644 index 0000000000..fa9b9de0df --- /dev/null +++ b/tests/reference/asr-arrays_09-50ee586.json @@ -0,0 +1,13 @@ +{ + "basename": "asr-arrays_09-50ee586", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", + "infile": "tests/errors/arrays_09.py", + "infile_hash": "e6f2cca7de4ecfddffdc96ee4c278de35c220b608c9e4fe4731fd9b8", + "outfile": null, + "outfile_hash": null, + "stdout": null, + "stdout_hash": null, + "stderr": "asr-arrays_09-50ee586.stderr", + "stderr_hash": "30bfc87e70c4b4688cf7162eec34dce8e52c959539d20ad8b79cf845", + "returncode": 2 +} \ No newline at end of file diff --git a/tests/reference/asr-arrays_09-50ee586.stderr b/tests/reference/asr-arrays_09-50ee586.stderr new file mode 100644 index 0000000000..58147a840d --- /dev/null +++ b/tests/reference/asr-arrays_09-50ee586.stderr @@ -0,0 +1,5 @@ +semantic error: Only those local variables which can be reduced to compile time constant should be used in dimensions of an array. + --> tests/errors/arrays_09.py:9:12 + | +9 | x: i64[p, q, r] = empty([q, p, r], dtype=int64) + | ^ diff --git a/tests/reference/asr-arrays_10-bc82d75.json b/tests/reference/asr-arrays_10-bc82d75.json new file mode 100644 index 0000000000..4599fd95cf --- /dev/null +++ b/tests/reference/asr-arrays_10-bc82d75.json @@ -0,0 +1,13 @@ +{ + "basename": "asr-arrays_10-bc82d75", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", + "infile": "tests/errors/arrays_10.py", + "infile_hash": "05aedf3d1013c61f73afc3de4ddca88ee33f029dcd62fadb66e7ec83", + "outfile": null, + "outfile_hash": null, + "stdout": null, + "stdout_hash": null, + "stderr": "asr-arrays_10-bc82d75.stderr", + "stderr_hash": "59e8cc91d7dae61bf60ec4d9cd23d62cdcb162e553bd64a3995fad19", + "returncode": 2 +} \ No newline at end of file diff --git a/tests/reference/asr-arrays_10-bc82d75.stderr b/tests/reference/asr-arrays_10-bc82d75.stderr new file mode 100644 index 0000000000..7935120aa7 --- /dev/null +++ b/tests/reference/asr-arrays_10-bc82d75.stderr @@ -0,0 +1,5 @@ +semantic error: Only those local variables which can be reduced to compile time constant should be used in dimensions of an array. + --> tests/errors/arrays_10.py:9:36 + | +9 | x: i64[100, 120, 200] = empty([q, p, r], dtype=int64) + | ^ diff --git a/tests/reference/asr-arrays_11-fc505b4.json b/tests/reference/asr-arrays_11-fc505b4.json new file mode 100644 index 0000000000..22700cace0 --- /dev/null +++ b/tests/reference/asr-arrays_11-fc505b4.json @@ -0,0 +1,13 @@ +{ + "basename": "asr-arrays_11-fc505b4", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", + "infile": "tests/errors/arrays_11.py", + "infile_hash": "111b4224a1988a90dc091fda4e0b1ebfd096f25f7b4ccc2f13728c1c", + "outfile": null, + "outfile_hash": null, + "stdout": null, + "stdout_hash": null, + "stderr": "asr-arrays_11-fc505b4.stderr", + "stderr_hash": "ef5e89392b20ad345ba9bcf862ab71b19e56c85d9838db742be117a1", + "returncode": 2 +} \ No newline at end of file diff --git a/tests/reference/asr-arrays_11-fc505b4.stderr b/tests/reference/asr-arrays_11-fc505b4.stderr new file mode 100644 index 0000000000..09cb02b625 --- /dev/null +++ b/tests/reference/asr-arrays_11-fc505b4.stderr @@ -0,0 +1,5 @@ +semantic error: Type mismatch in annotation-assignment, the types must be compatible + --> tests/errors/arrays_11.py:5:1 + | +5 | x: i16[4] = empty([5], dtype=int16) + | ^ ^^^^^^^^^^^^^^^^^^^^^^^ type mismatch ('i16[4]' and 'i16[5]') diff --git a/tests/reference/asr-arrays_12-63d6f25.json b/tests/reference/asr-arrays_12-63d6f25.json new file mode 100644 index 0000000000..a032a5fad1 --- /dev/null +++ b/tests/reference/asr-arrays_12-63d6f25.json @@ -0,0 +1,13 @@ +{ + "basename": "asr-arrays_12-63d6f25", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", + "infile": "tests/errors/arrays_12.py", + "infile_hash": "03cc809a4ee6a2ff47b5a91111d26e501ded647478e7fa03bde5bdf7", + "outfile": null, + "outfile_hash": null, + "stdout": null, + "stdout_hash": null, + "stderr": "asr-arrays_12-63d6f25.stderr", + "stderr_hash": "b6fa626301868bd5cbbef6d914f5b4f38b1d896b951753122969e74a", + "returncode": 2 +} \ No newline at end of file diff --git a/tests/reference/asr-arrays_12-63d6f25.stderr b/tests/reference/asr-arrays_12-63d6f25.stderr new file mode 100644 index 0000000000..8000ae521d --- /dev/null +++ b/tests/reference/asr-arrays_12-63d6f25.stderr @@ -0,0 +1,5 @@ +semantic error: Type mismatch in annotation-assignment, the types must be compatible + --> tests/errors/arrays_12.py:5:1 + | +5 | x: i16[5] = empty([5], dtype=int32) + | ^ ^^^^^^^^^^^^^^^^^^^^^^^ type mismatch ('i16[5]' and 'i32[5]') diff --git a/tests/reference/asr-arrays_13-b5fcc7e.json b/tests/reference/asr-arrays_13-b5fcc7e.json new file mode 100644 index 0000000000..3a17697702 --- /dev/null +++ b/tests/reference/asr-arrays_13-b5fcc7e.json @@ -0,0 +1,13 @@ +{ + "basename": "asr-arrays_13-b5fcc7e", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", + "infile": "tests/errors/arrays_13.py", + "infile_hash": "6aa585e55d5ba97e0c139b1a86268b41104955236fc6f87a11771505", + "outfile": null, + "outfile_hash": null, + "stdout": null, + "stdout_hash": null, + "stderr": "asr-arrays_13-b5fcc7e.stderr", + "stderr_hash": "6bde2f7fc14d5a461a58d694e44e19dd79ef5bee47c88b4022daf5d6", + "returncode": 2 +} \ No newline at end of file diff --git a/tests/reference/asr-arrays_13-b5fcc7e.stderr b/tests/reference/asr-arrays_13-b5fcc7e.stderr new file mode 100644 index 0000000000..14f0dbe414 --- /dev/null +++ b/tests/reference/asr-arrays_13-b5fcc7e.stderr @@ -0,0 +1,5 @@ +semantic error: Type mismatch in annotation-assignment, the types must be compatible + --> tests/errors/arrays_13.py:7:5 + | +7 | x: i16[4] = empty(5, dtype=int16) + | ^ ^^^^^^^^^^^^^^^^^^^^^ type mismatch ('i16[4]' and 'i16[5]') diff --git a/tests/reference/asr-arrays_14-78be00e.json b/tests/reference/asr-arrays_14-78be00e.json new file mode 100644 index 0000000000..b41704e4d0 --- /dev/null +++ b/tests/reference/asr-arrays_14-78be00e.json @@ -0,0 +1,13 @@ +{ + "basename": "asr-arrays_14-78be00e", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", + "infile": "tests/errors/arrays_14.py", + "infile_hash": "f724b8a5dfe7bc481f465e6f9105c9a2e6a8b7a5985a63ba52b58db2", + "outfile": null, + "outfile_hash": null, + "stdout": null, + "stdout_hash": null, + "stderr": "asr-arrays_14-78be00e.stderr", + "stderr_hash": "267aea8e48708230a9b2bc61c37c849a0b75cb45294ca25ee11fe632", + "returncode": 2 +} \ No newline at end of file diff --git a/tests/reference/asr-arrays_14-78be00e.stderr b/tests/reference/asr-arrays_14-78be00e.stderr new file mode 100644 index 0000000000..ed7f661811 --- /dev/null +++ b/tests/reference/asr-arrays_14-78be00e.stderr @@ -0,0 +1,5 @@ +semantic error: Type mismatch in annotation-assignment, the types must be compatible + --> tests/errors/arrays_14.py:7:5 + | +7 | x: i16[4] = empty((5), dtype=int16) + | ^ ^^^^^^^^^^^^^^^^^^^^^^^ type mismatch ('i16[4]' and 'i16[5]')