test: sizeOf
This commit is contained in:
parent
e8401ea6e7
commit
1abd36dc0d
2 changed files with 17 additions and 0 deletions
9
tests/lean/sizeof.lean
Normal file
9
tests/lean/sizeof.lean
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
-- Recall that we do not generate code for `sizeOf` instances since they are only used for proving termination
|
||||
#reduce sizeOf 10
|
||||
#reduce sizeOf [1, 2]
|
||||
#reduce sizeOf #[1, 2]
|
||||
#reduce sizeOf (10 : UInt8)
|
||||
#reduce sizeOf 'a'
|
||||
#reduce sizeOf ['h', 'e', 'l', 'l', 'o']
|
||||
#reduce sizeOf "abc"
|
||||
#reduce sizeOf `abc
|
||||
8
tests/lean/sizeof.lean.expected.out
Normal file
8
tests/lean/sizeof.lean.expected.out
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
10
|
||||
6
|
||||
7
|
||||
12
|
||||
100
|
||||
553
|
||||
308
|
||||
310
|
||||
Loading…
Add table
Reference in a new issue