on master help sign in
Merge pull request #3698 from RyanGlScott/regression-test

Add regression test for #3651.

commit8cb71c3ae87ea1aa331f7cd08223d72567f4029c authorAhmad Salim Al-Sibahi <asal@itu.dk> dateFri 17 Mar 2017, 16:42 (10 years ago) parent183f5333f0d399
4 files changed+22−1
test/TestData.hs+2−1 test/reg077/expected test/reg077/reg077.idr+17 test/reg077/run+3
test/TestData.hs+2−1
@@ -245,7 +245,8 @@ testFamiliesData = [
245245 ( 52, C_CG ),
246246 ( 67, ANY ),
247247 ( 75, ANY ),
248− ( 76, ANY )]),
248+ ( 76, ANY ),
249+ ( 77, ANY )]),
249250 ("regression", "Regression",
250251 [ ( 1 , ANY ),
251252 ( 2 , ANY )]),
test/reg077/expectednew file

No changes to the content.

test/reg077/reg077.idrnew file+17
@@ -0,0 +1,17 @@
1+data Tag : String -> List String -> Type where
2+ TZ : Tag l (l :: e)
3+ TS : Tag l e -> Tag l (l' :: e)
4+
5+SPi : (e : List String)
6+ -> ((l : String) -> Tag l e -> Type)
7+ -> Type
8+SPi [] _ = ()
9+SPi (l :: e) prop = (prop l TZ, SPi e $ \l' => \t => prop l' $ TS t)
10+
11+switch : (e : List String)
12+ -> (prop : (l : String) -> (t : Tag l e) -> Type)
13+ -> SPi e prop
14+ -> (l' : String) -> (t' : Tag l' e) -> prop l' t'
15+switch (l' :: e) prop ((propz, props)) l' TZ = propz
16+switch (l :: e) prop ((propz, props)) l' (TS t') =
17+ switch e (\l => \t => prop l (TS t)) props l' t'
test/reg077/runnew file+3
@@ -0,0 +1,3 @@
1+#!/usr/bin/env bash
2+${IDRIS:-idris} $@ --check reg077.idr
3+rm -f reg077 *.ibc