on master help sign in
Add (broken) test case for "private functions"
commitf04722199188da57c4fd23bb0dde96907cf9f975 authorSteven Shaw <steven@steshaw.org> dateMon 4 Sep 2017, 09:44 (9 years ago) parent52c103f
6 files changed+31−1
test/TestData.hs+2−1 test/interactive018/Bar.idr+10 test/interactive018/Foo.idr+8 test/interactive018/expected+4 test/interactive018/input+4 test/interactive018/run+3
test/TestData.hs+2−1
@@ -158,7 +158,8 @@ testFamiliesData = [
158158 ( 14, C_CG ),
159159 ( 15, ANY ),
160160 ( 16, ANY ),
161− ( 17, ANY )]),
161+ ( 17, ANY ),
162+ ( 18, ANY )]),
162163 ("interfaces", "Interfaces",
163164 [ ( 1, ANY ),
164165 ( 2, ANY ),
test/interactive018/Bar.idrnew file+10
@@ -0,0 +1,10 @@
1+module Bar
2+
3+import Foo
4+
5+bar_private : Nat -> Nat
6+bar_private n = n
7+
8+export
9+bar_visible : Nat -> Nat
10+bar_visible n = n
test/interactive018/Foo.idrnew file+8
@@ -0,0 +1,8 @@
1+module Foo
2+
3+foo_private : Nat -> Nat
4+foo_private n = n
5+
6+export
7+foo_visible : Nat -> Nat
8+foo_visible n = n
test/interactive018/expectednew file+4
@@ -0,0 +1,4 @@
1+bar_private : Nat -> Nat
2+bar_visible : Nat -> Nat
3+No such variable foo_private
4+foo_visible : Nat -> Nat
test/interactive018/inputnew file+4
@@ -0,0 +1,4 @@
1+:t bar_private
2+:t bar_visible
3+:t foo_private
4+:t foo_visible
test/interactive018/runnew file+3
@@ -0,0 +1,3 @@
1+#!/usr/bin/env bash
2+${IDRIS:-idris} $@ --quiet --port none Bar.idr < input
3+rm -f *.ibc