mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-10 13:44:21 +03:00
Add test for type search
This commit is contained in:
parent
6d82bf2f5d
commit
2b58434b6e
@ -65,7 +65,7 @@ idrisTests = MkTestPool []
|
||||
"interactive005", "interactive006", "interactive007", "interactive008",
|
||||
"interactive009", "interactive010", "interactive011", "interactive012",
|
||||
"interactive013", "interactive014", "interactive015", "interactive016",
|
||||
"interactive017", "interactive018",
|
||||
"interactive017", "interactive018", "interactive019",
|
||||
-- Interfaces
|
||||
"interface001", "interface002", "interface003", "interface004",
|
||||
"interface005", "interface006", "interface007", "interface008",
|
||||
|
7
tests/idris2/interactive019/TypeSearch.idr
Normal file
7
tests/idris2/interactive019/TypeSearch.idr
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
-- test that defs from Strings are available.
|
||||
import Data.Strings
|
||||
|
||||
-- same signature as a function pulled in from above import
|
||||
sameSig : Char -> String
|
||||
sameSig = singleton
|
26
tests/idris2/interactive019/expected
Normal file
26
tests/idris2/interactive019/expected
Normal file
@ -0,0 +1,26 @@
|
||||
1/1: Building TypeSearch (TypeSearch.idr)
|
||||
Main> prim__cast_CharString : (1 _ : Char) -> String
|
||||
|
||||
Main.sameSig : Char -> String
|
||||
|
||||
Data.Strings.singleton : Char -> String
|
||||
|
||||
Prelude.Types.cast : Char -> String
|
||||
|
||||
Prelude.Show.show : Char -> String
|
||||
Main> Prelude.const : a -> b -> a
|
||||
Constant function. Ignores its second argument.
|
||||
|
||||
Totality: total
|
||||
Main> Prelude.toUpper : Char -> Char
|
||||
Convert a letter to the corresponding upper-case letter, if any.
|
||||
Non-letters are ignored.
|
||||
|
||||
Totality: total
|
||||
|
||||
Prelude.toLower : Char -> Char
|
||||
Convert a letter to the corresponding lower-case letter, if any.
|
||||
Non-letters are ignored.
|
||||
|
||||
Totality: total
|
||||
Main> Bye for now!
|
4
tests/idris2/interactive019/input
Normal file
4
tests/idris2/interactive019/input
Normal file
@ -0,0 +1,4 @@
|
||||
:s Char -> String
|
||||
:s a -> b -> a
|
||||
:s Char -> Char
|
||||
:q
|
3
tests/idris2/interactive019/run
Executable file
3
tests/idris2/interactive019/run
Executable file
@ -0,0 +1,3 @@
|
||||
$1 --no-banner --no-color --console-width 0 TypeSearch.idr < input
|
||||
|
||||
rm -rf build
|
Loading…
Reference in New Issue
Block a user