Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcz committed Oct 22, 2024
1 parent 4d27e94 commit b8de11c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions test/Test.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ propReverseDoesNotChangeLength (xs : List Int) : Bool := length (reverse xs) ==
propReverseReverseIsIdentity (xs : List Int) : Bool := eqListInt xs (reverse (reverse xs));

propTailLengthOneLess (xs : List Int) : Bool :=
null xs || ofNat (length (tail xs)) == intSubNat (length xs) 1;
isEmpty xs || ofNat (length (tail xs)) == intSubNat (length xs) 1;

propSplitAtRecombine (n : Nat) (xs : List Int) : Bool :=
case splitAt n xs of lhs, rhs := eqListInt xs (lhs ++ rhs);
Expand Down Expand Up @@ -95,11 +95,11 @@ propTransposeMatrixDimensions (xs : List (List Int)) : Bool :=
checkTxsRowXsCol : Bool :=
case xs of
| x :: _ := length txs == length x
| _ := null txs;
| _ := isEmpty txs;
checkXsRowTxsCol : Bool :=
case txs of
| tx :: _ := length xs == length tx
| _ := null xs;
| _ := isEmpty xs;
in checkTxsRowXsCol && checkXsRowTxsCol;

propFoundElementSatisfiesPredicate (p : Int -> Bool) (xs : List Int) : Bool :=
Expand Down Expand Up @@ -129,7 +129,7 @@ propFindWithEmptyList (p : Int -> Bool) : Bool := find p [] == nothing;

propFindWithAlwaysTrueIsJust (xs : List Int) : Bool :=
if
| null xs := true
| isEmpty xs := true
| else :=
case find (const true) xs of
| just _ := true
Expand Down
2 changes: 1 addition & 1 deletion test/Test/AVL.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ s2DeleteWith : TestDescr Box :=
mkTestDescr@{
testTitle := TestDescr.testTitle s2 ++str "-delete-with";
testLen := sub (TestDescr.testLen s2) 2;
testSet := deleteManyWith Box.b [1; 8] (TestDescr.testSet s2 |> toList |> map mkBox |> fromList)
testSet := deleteManyWith Box.b [1; 8] (TestDescr.testSet s2 |> AVL.map mkBox)
};

s3 : TestDescr Nat :=
Expand Down

0 comments on commit b8de11c

Please sign in to comment.