mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-11-13 10:58:23 +03:00
Add more tests for passing on parameters
This commit is contained in:
parent
a2bc669b66
commit
694282e517
21
tests/modsys/functors/T026.cry
Normal file
21
tests/modsys/functors/T026.cry
Normal file
@ -0,0 +1,21 @@
|
||||
interface submodule S where
|
||||
x : [8]
|
||||
|
||||
submodule G where
|
||||
import interface submodule S
|
||||
y = x + 1
|
||||
|
||||
submodule F where
|
||||
import interface submodule S as A
|
||||
|
||||
submodule H where
|
||||
import submodule G { interface A }
|
||||
z = A::x + y
|
||||
|
||||
import submodule F where
|
||||
x = 5
|
||||
|
||||
import submodule H
|
||||
|
||||
|
||||
|
2
tests/modsys/functors/T026.icry
Normal file
2
tests/modsys/functors/T026.icry
Normal file
@ -0,0 +1,2 @@
|
||||
:load T026.cry
|
||||
z
|
4
tests/modsys/functors/T026.icry.stdout
Normal file
4
tests/modsys/functors/T026.icry.stdout
Normal file
@ -0,0 +1,4 @@
|
||||
Loading module Cryptol
|
||||
Loading module Cryptol
|
||||
Loading module Main
|
||||
0x0b
|
23
tests/modsys/functors/T027.cry
Normal file
23
tests/modsys/functors/T027.cry
Normal file
@ -0,0 +1,23 @@
|
||||
interface submodule S where
|
||||
x : [8]
|
||||
|
||||
submodule G where
|
||||
import interface submodule S
|
||||
y = x + 1
|
||||
|
||||
submodule F where
|
||||
import interface submodule S as A
|
||||
|
||||
submodule H where
|
||||
import interface submodule S as A
|
||||
import submodule G { interface A }
|
||||
z = A::x + y
|
||||
|
||||
import submodule F where
|
||||
x = 5
|
||||
|
||||
import submodule H where
|
||||
x = 6
|
||||
|
||||
|
||||
|
2
tests/modsys/functors/T027.icry
Normal file
2
tests/modsys/functors/T027.icry
Normal file
@ -0,0 +1,2 @@
|
||||
:load T027.cry
|
||||
z
|
4
tests/modsys/functors/T027.icry.stdout
Normal file
4
tests/modsys/functors/T027.icry.stdout
Normal file
@ -0,0 +1,4 @@
|
||||
Loading module Cryptol
|
||||
Loading module Cryptol
|
||||
Loading module Main
|
||||
0x0d
|
17
tests/modsys/functors/T028.cry
Normal file
17
tests/modsys/functors/T028.cry
Normal file
@ -0,0 +1,17 @@
|
||||
interface submodule S where
|
||||
x : [8]
|
||||
|
||||
submodule G where
|
||||
import interface submodule S
|
||||
y = x + 1
|
||||
|
||||
submodule F where
|
||||
import interface submodule S
|
||||
import submodule G { interface S }
|
||||
z = x + y
|
||||
|
||||
import submodule F where
|
||||
x = 5
|
||||
|
||||
|
||||
|
2
tests/modsys/functors/T028.icry
Normal file
2
tests/modsys/functors/T028.icry
Normal file
@ -0,0 +1,2 @@
|
||||
:load T028.cry
|
||||
z
|
4
tests/modsys/functors/T028.icry.stdout
Normal file
4
tests/modsys/functors/T028.icry.stdout
Normal file
@ -0,0 +1,4 @@
|
||||
Loading module Cryptol
|
||||
Loading module Cryptol
|
||||
Loading module Main
|
||||
0x0b
|
Loading…
Reference in New Issue
Block a user