Skip to content

Commit

Permalink
Issue #27: negative cases about scoping
Browse files Browse the repository at this point in the history
  • Loading branch information
np committed Dec 15, 2015
1 parent 19a7867 commit 5cab768
Show file tree
Hide file tree
Showing 10 changed files with 98 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fixtures/all/unscoped_recv_at.ll
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
unscoped_recv_at = proc(c : ?Int, d : !Int)
@(proc(c) recv c (x : Int))(c).
send d x
1 change: 1 addition & 0 deletions fixtures/all/unscoped_recv_slice.ll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
unscoped_recv_slice = proc(c) (slice (c) 1 as _ (recv c (x : Int))). send c x
1 change: 1 addition & 0 deletions fixtures/failure/unscoped_recv_at.ll
1 change: 1 addition & 0 deletions fixtures/failure/unscoped_recv_slice.ll
42 changes: 42 additions & 0 deletions tests/failure/unscoped_recv_at.t/TESTRECIPE
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

testname=unscoped_recv_at.t
command=Ling
args=( --check unscoped_recv_at.ll )
exit_code=1
stdin_file=/dev/null
stdout_file=/dev/null
stderr_file=stderr
sources=( unscoped_recv_at.ll )
products=( )

# Environment variables:
env_vars=( )

setup(){
: Perform here actions to be run before the tested program
}

munge(){
: Munge here the results of the tested program to ease the check
}

check(){
check_exit_code &&
check_stderr &&
check_stdout &&
check_products &&
: Perform here extra checks on the tested program
}

explain(){
explain_exit_code
explain_stdout
explain_stderr
explain_products
: Explain here more potential differences
}

teardown(){
: Undo here the actions of setup
}
3 changes: 3 additions & 0 deletions tests/failure/unscoped_recv_at.t/stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
While checking `unscoped_recv_at`
unknown definition x

1 change: 1 addition & 0 deletions tests/failure/unscoped_recv_at.t/unscoped_recv_at.ll
42 changes: 42 additions & 0 deletions tests/failure/unscoped_recv_slice.t/TESTRECIPE
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

testname=unscoped_recv_slice.t
command=Ling
args=( --check unscoped_recv_slice.ll )
exit_code=1
stdin_file=/dev/null
stdout_file=/dev/null
stderr_file=stderr
sources=( unscoped_recv_slice.ll )
products=( )

# Environment variables:
env_vars=( )

setup(){
: Perform here actions to be run before the tested program
}

munge(){
: Munge here the results of the tested program to ease the check
}

check(){
check_exit_code &&
check_stderr &&
check_stdout &&
check_products &&
: Perform here extra checks on the tested program
}

explain(){
explain_exit_code
explain_stdout
explain_stderr
explain_products
: Explain here more potential differences
}

teardown(){
: Undo here the actions of setup
}
3 changes: 3 additions & 0 deletions tests/failure/unscoped_recv_slice.t/stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
While checking `unscoped_recv_slice`
unknown definition x

1 change: 1 addition & 0 deletions tests/failure/unscoped_recv_slice.t/unscoped_recv_slice.ll

0 comments on commit 5cab768

Please sign in to comment.