Skip to content

Commit

Permalink
add positive test
Browse files Browse the repository at this point in the history
  • Loading branch information
janmasrovira committed Nov 21, 2024
1 parent e274add commit 4bc40ec
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/Compilation/Positive.hs
Original file line number Diff line number Diff line change
Expand Up @@ -495,5 +495,10 @@ tests =
"Test084: issue3030"
$(mkRelDir ".")
$(mkRelFile "test084.juvix")
$(mkRelFile "out/test084.out")
$(mkRelFile "out/test084.out"),
posTest
"Test085: Deriving Eq"
$(mkRelDir ".")
$(mkRelFile "test085.juvix")
$(mkRelFile "out/test085.out")
]
16 changes: 16 additions & 0 deletions tests/Compilation/positive/test085.juvix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-- Deriving Eq
module test085;

import Stdlib.Data.Fixity open;
import Stdlib.Data.Bool open;
import Stdlib.Data.Pair open;
import Stdlib.Trait.Eq open;
import Stdlib.System.IO open;

syntax alias isEqual := Eq.eq;

main : IO :=
printLn (isEqual true true)
>>> printLn (not (isEqual false true))
>>> printLn (isEqual (false, true) (false, true))
>>> printLn (not (isEqual (false, true) (false, false)));

0 comments on commit 4bc40ec

Please sign in to comment.