Skip to content

Commit

Permalink
TEST: Update reference tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaikh-Ubaid committed Aug 28, 2023
1 parent 604dce1 commit 62233d2
Show file tree
Hide file tree
Showing 24 changed files with 216 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/reference/asr-arrays_03-de2e952.json
Original file line number Diff line number Diff line change
@@ -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
}
5 changes: 5 additions & 0 deletions tests/reference/asr-arrays_03-de2e952.stderr
Original file line number Diff line number Diff line change
@@ -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]')
13 changes: 13 additions & 0 deletions tests/reference/asr-arrays_04-880407c.json
Original file line number Diff line number Diff line change
@@ -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
}
5 changes: 5 additions & 0 deletions tests/reference/asr-arrays_04-880407c.stderr
Original file line number Diff line number Diff line change
@@ -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]')
13 changes: 13 additions & 0 deletions tests/reference/asr-arrays_05-ec8fbd5.json
Original file line number Diff line number Diff line change
@@ -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
}
5 changes: 5 additions & 0 deletions tests/reference/asr-arrays_05-ec8fbd5.stderr
Original file line number Diff line number Diff line change
@@ -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]')
13 changes: 13 additions & 0 deletions tests/reference/asr-arrays_06-fbb09a3.json
Original file line number Diff line number Diff line change
@@ -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
}
5 changes: 5 additions & 0 deletions tests/reference/asr-arrays_06-fbb09a3.stderr
Original file line number Diff line number Diff line change
@@ -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]')
13 changes: 13 additions & 0 deletions tests/reference/asr-arrays_07-de430fd.json
Original file line number Diff line number Diff line change
@@ -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
}
5 changes: 5 additions & 0 deletions tests/reference/asr-arrays_07-de430fd.stderr
Original file line number Diff line number Diff line change
@@ -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]')
13 changes: 13 additions & 0 deletions tests/reference/asr-arrays_08-ba317a3.json
Original file line number Diff line number Diff line change
@@ -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
}
5 changes: 5 additions & 0 deletions tests/reference/asr-arrays_08-ba317a3.stderr
Original file line number Diff line number Diff line change
@@ -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]')
13 changes: 13 additions & 0 deletions tests/reference/asr-arrays_09-50ee586.json
Original file line number Diff line number Diff line change
@@ -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
}
5 changes: 5 additions & 0 deletions tests/reference/asr-arrays_09-50ee586.stderr
Original file line number Diff line number Diff line change
@@ -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)
| ^
13 changes: 13 additions & 0 deletions tests/reference/asr-arrays_10-bc82d75.json
Original file line number Diff line number Diff line change
@@ -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
}
5 changes: 5 additions & 0 deletions tests/reference/asr-arrays_10-bc82d75.stderr
Original file line number Diff line number Diff line change
@@ -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)
| ^
13 changes: 13 additions & 0 deletions tests/reference/asr-arrays_11-fc505b4.json
Original file line number Diff line number Diff line change
@@ -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
}
5 changes: 5 additions & 0 deletions tests/reference/asr-arrays_11-fc505b4.stderr
Original file line number Diff line number Diff line change
@@ -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]')
13 changes: 13 additions & 0 deletions tests/reference/asr-arrays_12-63d6f25.json
Original file line number Diff line number Diff line change
@@ -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
}
5 changes: 5 additions & 0 deletions tests/reference/asr-arrays_12-63d6f25.stderr
Original file line number Diff line number Diff line change
@@ -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]')
13 changes: 13 additions & 0 deletions tests/reference/asr-arrays_13-b5fcc7e.json
Original file line number Diff line number Diff line change
@@ -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
}
5 changes: 5 additions & 0 deletions tests/reference/asr-arrays_13-b5fcc7e.stderr
Original file line number Diff line number Diff line change
@@ -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]')
13 changes: 13 additions & 0 deletions tests/reference/asr-arrays_14-78be00e.json
Original file line number Diff line number Diff line change
@@ -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
}
5 changes: 5 additions & 0 deletions tests/reference/asr-arrays_14-78be00e.stderr
Original file line number Diff line number Diff line change
@@ -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]')

0 comments on commit 62233d2

Please sign in to comment.