1.23
2.0
main
test-branch
| Line | |
|---|
| 1 | #include <civlc.h>
|
|---|
| 2 |
|
|---|
| 3 | void main(){
|
|---|
| 4 | $scope s = $here, t = $here;
|
|---|
| 5 | $scope p = $scope_parent(s);
|
|---|
| 6 | $gcomm g = $gcomm_create(p, 5);
|
|---|
| 7 | $gcomm f;
|
|---|
| 8 |
|
|---|
| 9 | void foo(){
|
|---|
| 10 | $scope fs = $here;
|
|---|
| 11 | $scope sum = fs + s;// compute the lowest common ancestors of fs and s.
|
|---|
| 12 |
|
|---|
| 13 | $assert(s > fs);
|
|---|
| 14 | $assert(sum == s);
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
| 17 | f = g;
|
|---|
| 18 | g = f;
|
|---|
| 19 | foo();
|
|---|
| 20 | $assert(s == t);
|
|---|
| 21 | $assert(s != p);
|
|---|
| 22 | $assert(s <= p);// s is equal to p or s is strictly a descendant of p.
|
|---|
| 23 | $assert(s < p);// s is strictly a descendant of p
|
|---|
| 24 | $assert(p >= s);// p is equal to s or p is strictly an ancestor of s.
|
|---|
| 25 | $assert(p > s);// p is strictly a ancestor of s.
|
|---|
| 26 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.