Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Smit-create committed Mar 27, 2022
1 parent 6185a24 commit 0abd6e7
Show file tree
Hide file tree
Showing 38 changed files with 42 additions and 42 deletions.
2 changes: 1 addition & 1 deletion tests/reference/asr-complex1-f26c460.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"outfile": null,
"outfile_hash": null,
"stdout": "asr-complex1-f26c460.stdout",
"stdout_hash": "fefcf4d539190e6222b223d6059f45c51f1ae84bfa53000b89d1ffbe",
"stdout_hash": "dca326affbb09c4b671063648a9f996536c154448b1be92c738fb6a0",
"stderr": null,
"stderr_hash": null,
"returncode": 0
Expand Down
2 changes: 1 addition & 1 deletion tests/reference/asr-complex1-f26c460.stdout
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(TranslationUnit (SymbolTable 1 {complex@__lpython_overloaded_0__complex: (ExternalSymbol 1 complex@__lpython_overloaded_0__complex 5 __lpython_overloaded_0__complex lpython_builtin [] __lpython_overloaded_0__complex Public), complex@__lpython_overloaded_1__complex: (ExternalSymbol 1 complex@__lpython_overloaded_1__complex 5 __lpython_overloaded_1__complex lpython_builtin [] __lpython_overloaded_1__complex Public), complex@__lpython_overloaded_2__complex: (ExternalSymbol 1 complex@__lpython_overloaded_2__complex 5 __lpython_overloaded_2__complex lpython_builtin [] __lpython_overloaded_2__complex Public), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 47 {}) main_program [] []), test: (Subroutine (SymbolTable 3 {x: (Variable 3 x Local () () Default (Complex 8 []) Source Public Required .false.), y: (Variable 3 y Local () () Default (Complex 8 []) Source Public Required .false.), z: (Variable 3 z Local () () Default (Complex 4 []) Source Public Required .false.)}) test [] [(= (Var 3 x) (BinOp (ImplicitCast (ConstantInteger 2 (Integer 4 [])) IntegerToComplex (Complex 8 []) ()) Add (ConstantComplex 0.000000 3.000000 (Complex 8 [])) (Complex 8 []) () ()) ()) (= (Var 3 y) (BinOp (ImplicitCast (ConstantInteger 5 (Integer 4 [])) IntegerToComplex (Complex 8 []) ()) Add (ConstantComplex 0.000000 5.000000 (Complex 8 [])) (Complex 8 []) () ()) ()) (= (Var 3 z) (ImplicitCast (BinOp (Var 3 x) Add (Var 3 y) (Complex 8 []) () ()) ComplexToComplex (Complex 4 []) ()) ()) (= (Var 3 z) (ImplicitCast (BinOp (Var 3 x) Sub (Var 3 y) (Complex 8 []) () ()) ComplexToComplex (Complex 4 []) ()) ()) (= (Var 3 z) (ImplicitCast (BinOp (ImplicitCast (ConstantInteger 2 (Integer 4 [])) IntegerToComplex (Complex 8 []) ()) Mul (Var 3 x) (Complex 8 []) () ()) ComplexToComplex (Complex 4 []) ()) ())] Source Public Implementation () .false. .false.), test_complex: (Subroutine (SymbolTable 2 {b: (Variable 2 b Local () () Default (Logical 1 []) Source Public Required .false.), c: (Variable 2 c Local () () Default (Complex 4 []) Source Public Required .false.), c1: (Variable 2 c1 Local () () Default (Complex 4 []) Source Public Required .false.), c2: (Variable 2 c2 Local () () Default (Complex 4 []) Source Public Required .false.), c3: (Variable 2 c3 Local () () Default (Complex 8 []) Source Public Required .false.), complex: (ExternalSymbol 2 complex 5 complex lpython_builtin [] complex Private)}) test_complex [] [(= (Var 2 c) (ImplicitCast (FunctionCall 1 complex@__lpython_overloaded_0__complex 2 complex [((ConstantReal 5.000000 (Real 8 []))) ((ConstantReal 4.300000 (Real 8 [])))] (Complex 8 []) (ConstantComplex 5.000000 4.300000 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) ()) ()) (= (Var 2 c1) (ImplicitCast (FunctionCall 1 complex@__lpython_overloaded_1__complex 2 complex [((ConstantInteger 3 (Integer 4 []))) ((ConstantInteger 4 (Integer 4 [])))] (Complex 8 []) (ConstantComplex 3.000000 4.000000 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) ()) ()) (= (Var 2 c2) (ImplicitCast (FunctionCall 1 complex@__lpython_overloaded_2__complex 2 complex [((ConstantInteger 2 (Integer 4 []))) ((ConstantReal 4.500000 (Real 8 [])))] (Complex 8 []) (ConstantComplex 2.000000 4.500000 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) ()) ()) (= (Var 2 c3) (FunctionCall 1 complex@__lpython_overloaded_0__complex 2 complex [((ConstantReal 3.000000 (Real 8 []))) ((ConstantReal 4.000000 (Real 8 [])))] (Complex 8 []) (ConstantComplex 3.000000 4.000000 (Complex 8 [])) ()) ()) (= (Var 2 b) (Compare (Var 2 c1) NotEq (Var 2 c2) (Logical 4 []) () ()) ()) (= (Var 2 b) (Compare (ImplicitCast (Var 2 c1) ComplexToComplex (Complex 8 []) ()) Eq (Var 2 c3) (Logical 4 []) () ()) ()) (= (Var 2 c) (BinOp (Var 2 c1) Add (Var 2 c2) (Complex 4 []) () ()) ()) (= (Var 2 c) (BinOp (Var 2 c2) Sub (Var 2 c1) (Complex 4 []) () ()) ()) (= (Var 2 c) (BinOp (Var 2 c1) Mul (Var 2 c2) (Complex 4 []) () ()) ()) (= (Var 2 c) (ImplicitCast (BinOp (FunctionCall 1 complex@__lpython_overloaded_1__complex 2 complex [((ConstantInteger 1 (Integer 4 []))) ((ConstantInteger 2 (Integer 4 [])))] (Complex 8 []) (ConstantComplex 1.000000 2.000000 (Complex 8 [])) ()) Pow (FunctionCall 1 complex@__lpython_overloaded_0__complex 2 complex [((ConstantReal 3.345340 (Real 8 []))) ((ConstantReal 4.867868 (Real 8 [])))] (Complex 8 []) (ConstantComplex 3.345340 4.867868 (Complex 8 [])) ()) (Complex 8 []) (ConstantComplex 0.015553 0.065561 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) ()) ()) (= (Var 2 c) (ImplicitCast (BinOp (FunctionCall 1 complex@__lpython_overloaded_1__complex 2 complex [((ConstantInteger 1 (Integer 4 []))) ((ConstantInteger 2 (Integer 4 [])))] (Complex 8 []) (ConstantComplex 1.000000 2.000000 (Complex 8 [])) ()) Mul (FunctionCall 1 complex@__lpython_overloaded_1__complex 2 complex [((ConstantInteger 3 (Integer 4 []))) ((ConstantInteger 4 (Integer 4 [])))] (Complex 8 []) (ConstantComplex 3.000000 4.000000 (Complex 8 [])) ()) (Complex 8 []) (ConstantComplex -5.000000 10.000000 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) ()) ()) (= (Var 2 c) (ImplicitCast (BinOp (FunctionCall 1 complex@__lpython_overloaded_1__complex 2 complex [((ConstantInteger 4 (Integer 4 []))) ((ConstantInteger 5 (Integer 4 [])))] (Complex 8 []) (ConstantComplex 4.000000 5.000000 (Complex 8 [])) ()) Sub (FunctionCall 1 complex@__lpython_overloaded_1__complex 2 complex [((ConstantInteger 3 (Integer 4 []))) ((ConstantInteger 4 (Integer 4 [])))] (Complex 8 []) (ConstantComplex 3.000000 4.000000 (Complex 8 [])) ()) (Complex 8 []) (ConstantComplex 1.000000 1.000000 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) ()) ())] Source Public Implementation () .false. .false.)}) [])
(TranslationUnit (SymbolTable 1 {complex@__lpython_overloaded_0__complex: (ExternalSymbol 1 complex@__lpython_overloaded_0__complex 5 __lpython_overloaded_0__complex lpython_builtin [] __lpython_overloaded_0__complex Public), complex@__lpython_overloaded_1__complex: (ExternalSymbol 1 complex@__lpython_overloaded_1__complex 5 __lpython_overloaded_1__complex lpython_builtin [] __lpython_overloaded_1__complex Public), complex@__lpython_overloaded_2__complex: (ExternalSymbol 1 complex@__lpython_overloaded_2__complex 5 __lpython_overloaded_2__complex lpython_builtin [] __lpython_overloaded_2__complex Public), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 45 {}) main_program [] []), test: (Subroutine (SymbolTable 3 {x: (Variable 3 x Local () () Default (Complex 8 []) Source Public Required .false.), y: (Variable 3 y Local () () Default (Complex 8 []) Source Public Required .false.), z: (Variable 3 z Local () () Default (Complex 4 []) Source Public Required .false.)}) test [] [(= (Var 3 x) (BinOp (ImplicitCast (ConstantInteger 2 (Integer 4 [])) IntegerToComplex (Complex 8 []) ()) Add (ConstantComplex 0.000000 3.000000 (Complex 8 [])) (Complex 8 []) () ()) ()) (= (Var 3 y) (BinOp (ImplicitCast (ConstantInteger 5 (Integer 4 [])) IntegerToComplex (Complex 8 []) ()) Add (ConstantComplex 0.000000 5.000000 (Complex 8 [])) (Complex 8 []) () ()) ()) (= (Var 3 z) (ImplicitCast (BinOp (Var 3 x) Add (Var 3 y) (Complex 8 []) () ()) ComplexToComplex (Complex 4 []) ()) ()) (= (Var 3 z) (ImplicitCast (BinOp (Var 3 x) Sub (Var 3 y) (Complex 8 []) () ()) ComplexToComplex (Complex 4 []) ()) ()) (= (Var 3 z) (ImplicitCast (BinOp (ImplicitCast (ConstantInteger 2 (Integer 4 [])) IntegerToComplex (Complex 8 []) ()) Mul (Var 3 x) (Complex 8 []) () ()) ComplexToComplex (Complex 4 []) ()) ())] Source Public Implementation () .false. .false.), test_complex: (Subroutine (SymbolTable 2 {b: (Variable 2 b Local () () Default (Logical 1 []) Source Public Required .false.), c: (Variable 2 c Local () () Default (Complex 4 []) Source Public Required .false.), c1: (Variable 2 c1 Local () () Default (Complex 4 []) Source Public Required .false.), c2: (Variable 2 c2 Local () () Default (Complex 4 []) Source Public Required .false.), c3: (Variable 2 c3 Local () () Default (Complex 8 []) Source Public Required .false.), complex: (ExternalSymbol 2 complex 5 complex lpython_builtin [] complex Private)}) test_complex [] [(= (Var 2 c) (ImplicitCast (FunctionCall 1 complex@__lpython_overloaded_0__complex 2 complex [((ConstantReal 5.000000 (Real 8 []))) ((ConstantReal 4.300000 (Real 8 [])))] (Complex 8 []) (ConstantComplex 5.000000 4.300000 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) ()) ()) (= (Var 2 c1) (ImplicitCast (FunctionCall 1 complex@__lpython_overloaded_1__complex 2 complex [((ConstantInteger 3 (Integer 4 []))) ((ConstantInteger 4 (Integer 4 [])))] (Complex 8 []) (ConstantComplex 3.000000 4.000000 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) ()) ()) (= (Var 2 c2) (ImplicitCast (FunctionCall 1 complex@__lpython_overloaded_2__complex 2 complex [((ConstantInteger 2 (Integer 4 []))) ((ConstantReal 4.500000 (Real 8 [])))] (Complex 8 []) (ConstantComplex 2.000000 4.500000 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) ()) ()) (= (Var 2 c3) (FunctionCall 1 complex@__lpython_overloaded_0__complex 2 complex [((ConstantReal 3.000000 (Real 8 []))) ((ConstantReal 4.000000 (Real 8 [])))] (Complex 8 []) (ConstantComplex 3.000000 4.000000 (Complex 8 [])) ()) ()) (= (Var 2 b) (Compare (Var 2 c1) NotEq (Var 2 c2) (Logical 4 []) () ()) ()) (= (Var 2 b) (Compare (ImplicitCast (Var 2 c1) ComplexToComplex (Complex 8 []) ()) Eq (Var 2 c3) (Logical 4 []) () ()) ()) (= (Var 2 c) (BinOp (Var 2 c1) Add (Var 2 c2) (Complex 4 []) () ()) ()) (= (Var 2 c) (BinOp (Var 2 c2) Sub (Var 2 c1) (Complex 4 []) () ()) ()) (= (Var 2 c) (BinOp (Var 2 c1) Mul (Var 2 c2) (Complex 4 []) () ()) ()) (= (Var 2 c) (ImplicitCast (BinOp (FunctionCall 1 complex@__lpython_overloaded_1__complex 2 complex [((ConstantInteger 1 (Integer 4 []))) ((ConstantInteger 2 (Integer 4 [])))] (Complex 8 []) (ConstantComplex 1.000000 2.000000 (Complex 8 [])) ()) Pow (FunctionCall 1 complex@__lpython_overloaded_0__complex 2 complex [((ConstantReal 3.345340 (Real 8 []))) ((ConstantReal 4.867868 (Real 8 [])))] (Complex 8 []) (ConstantComplex 3.345340 4.867868 (Complex 8 [])) ()) (Complex 8 []) (ConstantComplex 0.015553 0.065561 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) ()) ()) (= (Var 2 c) (ImplicitCast (BinOp (FunctionCall 1 complex@__lpython_overloaded_1__complex 2 complex [((ConstantInteger 1 (Integer 4 []))) ((ConstantInteger 2 (Integer 4 [])))] (Complex 8 []) (ConstantComplex 1.000000 2.000000 (Complex 8 [])) ()) Mul (FunctionCall 1 complex@__lpython_overloaded_1__complex 2 complex [((ConstantInteger 3 (Integer 4 []))) ((ConstantInteger 4 (Integer 4 [])))] (Complex 8 []) (ConstantComplex 3.000000 4.000000 (Complex 8 [])) ()) (Complex 8 []) (ConstantComplex -5.000000 10.000000 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) ()) ()) (= (Var 2 c) (ImplicitCast (BinOp (FunctionCall 1 complex@__lpython_overloaded_1__complex 2 complex [((ConstantInteger 4 (Integer 4 []))) ((ConstantInteger 5 (Integer 4 [])))] (Complex 8 []) (ConstantComplex 4.000000 5.000000 (Complex 8 [])) ()) Sub (FunctionCall 1 complex@__lpython_overloaded_1__complex 2 complex [((ConstantInteger 3 (Integer 4 []))) ((ConstantInteger 4 (Integer 4 [])))] (Complex 8 []) (ConstantComplex 3.000000 4.000000 (Complex 8 [])) ()) (Complex 8 []) (ConstantComplex 1.000000 1.000000 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) ()) ())] Source Public Implementation () .false. .false.)}) [])
4 changes: 2 additions & 2 deletions tests/reference/asr-constants1-5828e8a.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"basename": "asr-constants1-5828e8a",
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
"infile": "tests/constants1.py",
"infile_hash": "6e4d62b8488be605011d1fbbeaf379c9c316400e3d72969043ca7206",
"infile_hash": "25a5e2512f173e8bbac9ca8470501f4bcdb729b16e4b12e48e2f5a6d",
"outfile": null,
"outfile_hash": null,
"stdout": "asr-constants1-5828e8a.stdout",
"stdout_hash": "6a0c65b90ff3f145e48df61774f69b1a203e6aa3d7e6e978100b17a2",
"stdout_hash": "ffe5fd8c9f35879fc4996ea97a497cbdbf6b93e07e6089e024a83be1",
"stderr": null,
"stderr_hash": null,
"returncode": 0
Expand Down
2 changes: 1 addition & 1 deletion tests/reference/asr-constants1-5828e8a.stdout

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/reference/asr-expr1-8df2d66.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"outfile": null,
"outfile_hash": null,
"stdout": "asr-expr1-8df2d66.stdout",
"stdout_hash": "04f29f9cf8d479b8e45130f8660686af04d9813a8a55f623b09f995a",
"stdout_hash": "56029ab029deaf4a7dc26c4d85f60242379d33342a4ea938fa054fe9",
"stderr": null,
"stderr_hash": null,
"returncode": 0
Expand Down
2 changes: 1 addition & 1 deletion tests/reference/asr-expr1-8df2d66.stdout
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(TranslationUnit (SymbolTable 1 {lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 46 {}) main_program [] []), test_namedexpr: (Subroutine (SymbolTable 2 {a: (Variable 2 a Local () () Default (Integer 4 []) Source Public Required .false.), ord: (ExternalSymbol 2 ord 4 ord lpython_builtin [] ord Private), x: (Variable 2 x Local () () Default (Integer 4 []) Source Public Required .false.), y: (Variable 2 y Local () () Default (Integer 4 []) Source Public Required .false.)}) test_namedexpr [] [(= (Var 2 x) (NamedExpr (Var 2 y) (ConstantInteger 0 (Integer 4 [])) (Integer 4 [])) ()) (If (NamedExpr (Var 2 a) (FunctionCall 2 ord () [((ConstantString "3" (Character 1 1 () [])))] (Integer 4 []) (ConstantInteger 51 (Integer 4 [])) ()) (Integer 4 [])) [(= (Var 2 x) (ConstantInteger 1 (Integer 4 [])) ())] []) (WhileLoop (NamedExpr (Var 2 a) (ConstantInteger 1 (Integer 4 [])) (Integer 4 [])) [(= (Var 2 y) (ConstantInteger 1 (Integer 4 [])) ())])] Source Public Implementation () .false. .false.)}) [])
(TranslationUnit (SymbolTable 1 {lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 44 {}) main_program [] []), test_namedexpr: (Subroutine (SymbolTable 2 {a: (Variable 2 a Local () () Default (Integer 4 []) Source Public Required .false.), ord: (ExternalSymbol 2 ord 4 ord lpython_builtin [] ord Private), x: (Variable 2 x Local () () Default (Integer 4 []) Source Public Required .false.), y: (Variable 2 y Local () () Default (Integer 4 []) Source Public Required .false.)}) test_namedexpr [] [(= (Var 2 x) (NamedExpr (Var 2 y) (ConstantInteger 0 (Integer 4 [])) (Integer 4 [])) ()) (If (NamedExpr (Var 2 a) (FunctionCall 2 ord () [((ConstantString "3" (Character 1 1 () [])))] (Integer 4 []) (ConstantInteger 51 (Integer 4 [])) ()) (Integer 4 [])) [(= (Var 2 x) (ConstantInteger 1 (Integer 4 [])) ())] []) (WhileLoop (NamedExpr (Var 2 a) (ConstantInteger 1 (Integer 4 [])) (Integer 4 [])) [(= (Var 2 y) (ConstantInteger 1 (Integer 4 [])) ())])] Source Public Implementation () .false. .false.)}) [])
2 changes: 1 addition & 1 deletion tests/reference/asr-expr10-efcbb1b.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"outfile": null,
"outfile_hash": null,
"stdout": "asr-expr10-efcbb1b.stdout",
"stdout_hash": "e101a5fca8b50bb0ec8a5613f9e9c4d18a482300e2d84f141184c23c",
"stdout_hash": "08fc230feea1fc6391fe928003639c74ccfb5992226c352d8a531571",
"stderr": null,
"stderr_hash": null,
"returncode": 0
Expand Down
Loading

0 comments on commit 0abd6e7

Please sign in to comment.