repo.or.cz
/
why3.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Bump version.
[why3.git]
/
examples
/
tests
/
queue-test.mlw
blob
035fb366ace632e43ec6e4a717d4c924698c2c62
1
2
module Test
3
4
use int.Int
5
use seq.Seq
6
use queue.Queue
7
8
let test0 () =
9
let s = create () : t 'a in
10
assert { s = empty };
11
let b = is_empty s in
12
assert { b = True };
13
let n = length s in
14
assert { n = 0 }
15
16
let test1 ()
17
raises { Empty }
18
= let s = create () in
19
push 1 s;
20
let x = peek s in assert { x = 1 };
21
push 2 s;
22
let x = peek s in assert { x = 1 };
23
()
24
25
end