| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f63383d commit ab70fe6
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,9 @@ | |||
| 1 | + def test_Compare(): | ||
| 2 | + a: bool | ||
| 3 | + a = 5 > 4 | ||
| 4 | + a = 5 <= 4 | ||
| 5 | + a = 5 < 4 | ||
| 6 | + a = 5.6 >= 5.59999 | ||
| 7 | + a = 3.3 == 3.3 | ||
| 8 | + a = 3.3 != 3.4 | ||
| 9 | + a = complex(3, 4) == complex(3., 4.) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,13 @@ | |||
| 1 | + { | ||
| 2 | + "basename": "asr-expr13-81bdb5a", | ||
| 3 | + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", | ||
| 4 | + "infile": "tests/expr13.py", | ||
| 5 | + "infile_hash": "56a0c42089555c236b20fd1c1435908875178987c5f7f4c10ef9179a", | ||
| 6 | + "outfile": null, | ||
| 7 | + "outfile_hash": null, | ||
| 8 | + "stdout": "asr-expr13-81bdb5a.stdout", | ||
| 9 | + "stdout_hash": "644ecdcd79450726950d68d4d71e1803614d7bb8c94d706e676279fb", | ||
| 10 | + "stderr": null, | ||
| 11 | + "stderr_hash": null, | ||
| 12 | + "returncode": 0 | ||
| 13 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1 @@ | |||
| 1 | + (TranslationUnit (SymbolTable 1 {main_program: (Program (SymbolTable 3 {}) main_program [] []), test_Compare: (Subroutine (SymbolTable 2 {a: (Variable 2 a Local () () Default (Logical 1 []) Source Public Required .false.)}) test_Compare [] [(= (Var 2 a) (Compare (ConstantInteger 5 (Integer 4 [])) Gt (ConstantInteger 4 (Integer 4 [])) (Logical 4 []) (ConstantLogical .true. (Integer 4 [])) ()) ()) (= (Var 2 a) (Compare (ConstantInteger 5 (Integer 4 [])) LtE (ConstantInteger 4 (Integer 4 [])) (Logical 4 []) (ConstantLogical .false. (Integer 4 [])) ()) ()) (= (Var 2 a) (Compare (ConstantInteger 5 (Integer 4 [])) Lt (ConstantInteger 4 (Integer 4 [])) (Logical 4 []) (ConstantLogical .false. (Integer 4 [])) ()) ()) (= (Var 2 a) (Compare (ConstantReal 5.600000 (Real 8 [])) GtE (ConstantReal 5.599990 (Real 8 [])) (Logical 4 []) (ConstantLogical .true. (Real 8 [])) ()) ()) (= (Var 2 a) (Compare (ConstantReal 3.300000 (Real 8 [])) Eq (ConstantReal 3.300000 (Real 8 [])) (Logical 4 []) (ConstantLogical .true. (Real 8 [])) ()) ()) (= (Var 2 a) (Compare (ConstantReal 3.300000 (Real 8 [])) NotEq (ConstantReal 3.400000 (Real 8 [])) (Logical 4 []) (ConstantLogical .true. (Real 8 [])) ()) ()) (= (Var 2 a) (Compare (ConstantComplex 3.000000 4.000000 (Complex 8 [])) Eq (ConstantComplex 3.000000 4.000000 (Complex 8 [])) (Logical 4 []) (ConstantLogical .true. (Complex 8 [])) ()) ())] Source Public Implementation () .false. .false.)}) []) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,13 @@ | |||
| 1 | + { | ||
| 2 | + "basename": "ast-expr13-c35ace1", | ||
| 3 | + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", | ||
| 4 | + "infile": "tests/expr13.py", | ||
| 5 | + "infile_hash": "56a0c42089555c236b20fd1c1435908875178987c5f7f4c10ef9179a", | ||
| 6 | + "outfile": null, | ||
| 7 | + "outfile_hash": null, | ||
| 8 | + "stdout": "ast-expr13-c35ace1.stdout", | ||
| 9 | + "stdout_hash": "d3c77a603d55d96c78e421989abdb49b3ed2b8f52e660496bf76ca22", | ||
| 10 | + "stderr": null, | ||
| 11 | + "stderr_hash": null, | ||
| 12 | + "returncode": 0 | ||
| 13 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1 @@ | |||
| 1 | + (Module [(FunctionDef test_Compare ([] [] [] [] [] [] []) [(AnnAssign (Name a Store) (Name bool Load) () 1) (Assign [(Name a Store)] (Compare (ConstantInt 5 ()) Gt [(ConstantInt 4 ())]) ()) (Assign [(Name a Store)] (Compare (ConstantInt 5 ()) LtE [(ConstantInt 4 ())]) ()) (Assign [(Name a Store)] (Compare (ConstantInt 5 ()) Lt [(ConstantInt 4 ())]) ()) (Assign [(Name a Store)] (Compare (ConstantFloat 5.600000 ()) GtE [(ConstantFloat 5.599990 ())]) ()) (Assign [(Name a Store)] (Compare (ConstantFloat 3.300000 ()) Eq [(ConstantFloat 3.300000 ())]) ()) (Assign [(Name a Store)] (Compare (ConstantFloat 3.300000 ()) NotEq [(ConstantFloat 3.400000 ())]) ()) (Assign [(Name a Store)] (Compare (Call (Name complex Load) [(ConstantInt 3 ()) (ConstantInt 4 ())] []) Eq [(Call (Name complex Load) [(ConstantFloat 3.000000 ()) (ConstantFloat 4.000000 ())] [])]) ())] [] () ())] []) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -107,6 +107,11 @@ ast = true | |||
| 107 | 107 | asr = true | |
| 108 | 108 | cpp = true | |
| 109 | 109 | ||
| 110 | + [[test]] | ||
| 111 | + filename = "expr13.py" | ||
| 112 | + ast = true | ||
| 113 | + asr = true | ||
| 114 | + | ||
| 110 | 115 | [[test]] | |
| 111 | 116 | filename = "expr_01.py" | |
| 112 | 117 | ast = true | |
| Back | FazBrowse Home | New Git URL |
0 commit comments