source: CIVL/examples/library/civlc/equals.cvl@ d87ec9c

1.23 2.0 acw/focus-triggers main test-branch
Last change on this file since d87ec9c was e1083b3, checked in by Manchun Zheng <zmanchun@…>, 12 years ago

added system function translate_ptr() and a test method accordingly.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@1272 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 278 bytes
Line 
1#include<civlc.h>
2
3void main(){
4 int* data;
5 _Bool result;
6 int a = 1;
7
8 data = (int*) $malloc($root, sizeof(int)*2);
9 *data = 1;
10 *(data + 1) = 2;
11 result = $equals(data, data+1);
12 $assert(!result);
13 result = $equals(data, &a);
14 $assert(result);
15 $free(data);
16}
Note: See TracBrowser for help on using the repository browser.