-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.doppl
52 lines (36 loc) · 959 Bytes
/
main.doppl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
task(1) UnitTests {
#Private members
data foo = int
future zee = int
#Shared members
shared sha = int
init: {
output = "Init State Works\n"
foo = 42
#assert check foo in compiled cpp for 42
-->bar
}
bar: {
output = "State Transition Works\n"
temp: {
clone: {
output = "Transition in Cloned Tasks Works\n"
yield 99
}
output = "Internal State Declerations Work\n"
-->clone
}
zee = temp
#assert check zee in compiled cpp for 99
output = "Future Members Work\n"
-->tar(zee)
}
tar(future param = int): {
#assert check param in compiled cpp for 99
output = "Parameterized Transition Works\n"
sha = foo
#assert check sha in compiled cpp for 42
output = "Shared Members Work\n"
finish
}
}