Skip to content

Commit

Permalink
Move typing tests to t/typing/
Browse files Browse the repository at this point in the history
  • Loading branch information
nishantjr committed Dec 5, 2018
1 parent f639991 commit aaa447d
Show file tree
Hide file tree
Showing 25 changed files with 71 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/build.py
Expand Up @@ -84,7 +84,7 @@ def test_strict(input):

def test_typing(input):
global typing_tests
expected = input + '.typing.expected'
expected = input + '.expected'
typing_tests += [ do_test(typing, input, expected) ]

# Basic tests
Expand All @@ -98,7 +98,6 @@ def test_typing(input):
# We need distinct exptected and actual files for these.
test_ocaml('t/bytestring.plc')
test_java('t/bytestring.plc')
test_typing('t/builtin-app.plc')

# Cryptography
# ------------
Expand All @@ -124,7 +123,11 @@ def test_typing(input):
test('t/sum.plc')
test('t/fact.plc')

# test_typing('t/lists/nil.plc')
# Typing tests
# ------------

test_typing('t/typing/builtin-app.plc')

test_typing('t/typing/add-integer.plc')
test_typing('t/typing/error.plc')
test_typing('t/typing/int-id-app.plc')
Expand Down
Empty file removed t/add-integer.plc.typing.expected
Empty file.
Empty file removed t/builtin-app.plc.typing.expected
Empty file.
Empty file removed t/error.plc.typing.expected
Empty file.
Empty file removed t/int-id-app.plc.typing.expected
Empty file.
Empty file.
Empty file removed t/int-id-poly.plc.typing.expected
Empty file.
Empty file removed t/int-id.plc.typing.expected
Empty file.
Empty file removed t/int.plc.typing.expected
Empty file.
File renamed without changes.
8 changes: 8 additions & 0 deletions t/typing/add-integer.plc.expected
@@ -0,0 +1,8 @@
<generatedTop>
<k>
( all $s ( size ) ( fun [ ( con integer ) $s ] ( fun [ ( con integer ) $s ] [ ( con integer ) $s ] ) ) ) :: ( type )
</k>
<env>
.
</env>
</generatedTop>
1 change: 1 addition & 0 deletions t/typing/builtin-app.plc
@@ -0,0 +1 @@
(program 0.1.0 [ [ {(builtin addInteger) (con 1)} (con 1 ! 1)] (con 1 ! 1) ])
8 changes: 8 additions & 0 deletions t/typing/builtin-app.plc.expected
@@ -0,0 +1,8 @@
<generatedTop>
<k>
[ ( con integer ) ( con 1 ) ] :: ( type )
</k>
<env>
.
</env>
</generatedTop>
File renamed without changes.
8 changes: 8 additions & 0 deletions t/typing/error.plc.expected
@@ -0,0 +1,8 @@
<generatedTop>
<k>
( fun [ ( con integer ) ( con 1 ) ] [ ( con integer ) ( con 1 ) ] ) :: ( type )
</k>
<env>
.
</env>
</generatedTop>
File renamed without changes.
8 changes: 8 additions & 0 deletions t/typing/int-id-app.plc.expected
@@ -0,0 +1,8 @@
<generatedTop>
<k>
[ ( con integer ) ( con 1 ) ] :: ( type )
</k>
<env>
.
</env>
</generatedTop>
File renamed without changes.
8 changes: 8 additions & 0 deletions t/typing/int-id-poly-inst.plc.expected
@@ -0,0 +1,8 @@
<generatedTop>
<k>
( fun [ ( con integer ) ( con 3 ) ] [ ( con integer ) ( con 3 ) ] ) :: ( type )
</k>
<env>
.
</env>
</generatedTop>
File renamed without changes.
8 changes: 8 additions & 0 deletions t/typing/int-id-poly.plc.expected
@@ -0,0 +1,8 @@
<generatedTop>
<k>
( all s ( size ) ( fun [ ( con integer ) s ] [ ( con integer ) s ] ) ) :: ( type )
</k>
<env>
.
</env>
</generatedTop>
File renamed without changes.
8 changes: 8 additions & 0 deletions t/typing/int-id.plc.expected
@@ -0,0 +1,8 @@
<generatedTop>
<k>
( fun [ ( con integer ) ( con 1 ) ] [ ( con integer ) ( con 1 ) ] ) :: ( type )
</k>
<env>
.
</env>
</generatedTop>
File renamed without changes.
8 changes: 8 additions & 0 deletions t/typing/int.plc.expected
@@ -0,0 +1,8 @@
<generatedTop>
<k>
[ ( con integer ) ( con 1 ) ] :: ( type )
</k>
<env>
.
</env>
</generatedTop>

0 comments on commit aaa447d

Please sign in to comment.