-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1b5dbd2
commit 8d4d047
Showing
143 changed files
with
1,600 additions
and
1,605 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
// This test connects a simple counting source to tester | ||
// that checks against its own count. | ||
target C { | ||
fast: true, | ||
timeout: 10 sec | ||
fast: true, | ||
timeout: 10 sec | ||
}; | ||
|
||
reactor Source(period:time(2 sec)) { | ||
output y:int; | ||
timer t(1 sec, period); | ||
state count:int(0); | ||
reaction(t) -> y {= | ||
(self->count)++; | ||
lf_set(y, self->count); | ||
=} | ||
output y:int; | ||
timer t(1 sec, period); | ||
state count:int(0); | ||
reaction(t) -> y {= | ||
(self->count)++; | ||
lf_set(y, self->count); | ||
=} | ||
} | ||
|
||
reactor Test { | ||
input x:int; | ||
state count:int(0); | ||
reaction(x) {= | ||
(self->count)++; | ||
printf("Received %d\n", x->value); | ||
if (x->value != self->count) { | ||
printf("FAILURE: Expected %d\n", self->count); | ||
exit(1); | ||
} | ||
=} | ||
input x:int; | ||
state count:int(0); | ||
reaction(x) {= | ||
(self->count)++; | ||
printf("Received %d\n", x->value); | ||
if (x->value != self->count) { | ||
printf("FAILURE: Expected %d\n", self->count); | ||
exit(1); | ||
} | ||
=} | ||
} | ||
|
||
main reactor CompositionAfter(delay:time(5 sec)) { | ||
s = new Source(); | ||
d = new Test(); | ||
s.y -> d.x after delay; | ||
s = new Source(); | ||
d = new Test(); | ||
s.y -> d.x after delay; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
You might want to fix these missing newlines too, now that you're at it!