Skip to content

Commit

Permalink
add: relational seq library tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tnelson committed Oct 19, 2024
1 parent 890e203 commit c0b36a1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions forge/tests/forge/library/seq.frg
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ test expect {
lastidx: {order implies (lastIdxOf[Data.seq, A] = 2)} is theorem
dups: {order implies (hasDups[Data.seq])} is theorem
notempty: {order implies (not isEmpty[Data.seq])} is theorem
idx_produces_first: {order implies (idxOf[Data.seq, A] = 0)} is theorem
}
14 changes: 14 additions & 0 deletions forge/tests/forge/library/seq_relational.frg
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#lang forge
/*
Some behaviors of the sequence library are relational by nature. This module tests them,
using the same definitions as in the base seq.frg file.
*/

open "seq.frg"
option run_sterling off

test expect {
indsOf_produces_all: {order implies (indsOf[Data.seq, A] = (0+2))} is theorem
elems_check: {order implies (elems[Data.seq] = (A+B+C+D))} is theorem
inds_check: {order implies (inds[Data.seq] = (0+1+2+3+4))} is theorem
}

0 comments on commit c0b36a1

Please sign in to comment.