- Timestamp:
- Feb 6, 2017, 4:19:53 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 424931d, fe26fbf
- Parents:
- c0aa336 (diff), 6a5f0e7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src/tests
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/Makefile.am
rc0aa336 rb4d65c7 30 30 31 31 all-local : 32 @+python test.py vector_test avl_test operators numericConstants expression enum array typeof cast dtor-early-exit init_once coroutine 32 @+python test.py vector_test avl_test operators numericConstants expression enum array typeof cast dtor-early-exit init_once coroutine thread 33 33 34 34 all-tests : -
src/tests/Makefile.in
rc0aa336 rb4d65c7 651 651 652 652 all-local : 653 @+python test.py vector_test avl_test operators numericConstants expression enum array typeof cast dtor-early-exit init_once coroutine 653 @+python test.py vector_test avl_test operators numericConstants expression enum array typeof cast dtor-early-exit init_once coroutine thread 654 654 655 655 all-tests : -
src/tests/dtor-early-exit.c
rc0aa336 rb4d65c7 28 28 // don't want these called 29 29 void ?{}(A * a) { assert( false ); } 30 void ?{}(A * a, char * name) { a->name = name; sout | "construct " | name | endl; a->x = malloc(); }30 void ?{}(A * a, char * name) { a->name = name; sout | "construct " | name | endl; a->x = (int*)malloc(); } 31 31 void ?{}(A * a, char * name, int * ptr) { assert( false ); } 32 32 33 33 A ?=?(A * a, A a) { sout | "assign " | a->name | " " | a.name; return a; } 34 void ?{}(A * a, A a) { sout | "copy construct " | a.name | endl; a->x = malloc(); }34 void ?{}(A * a, A a) { sout | "copy construct " | a.name | endl; a->x = (int*)malloc(); } 35 35 void ^?{}(A * a) { sout | "destruct " | a->name | endl; free(a->x); } 36 36 -
src/tests/test.py
rc0aa336 rb4d65c7 168 168 169 169 def run_test_instance(t, generate, dry_run, debug) : 170 # print formated name 171 name_txt = "%20s " % t.name 172 173 #run the test instance and collect the result 174 test_failed, error = run_single_test(t, generate, dry_run, debug) 175 176 # update output based on current action 177 if generate : 178 failed_txt = "ERROR" 179 success_txt = "Done" 180 else : 181 failed_txt = "FAILED" 182 success_txt = "PASSED" 183 184 #print result with error if needed 185 text = name_txt + (failed_txt if test_failed else success_txt) 186 out = sys.stdout 187 if error : 188 text = text + "\n" + error 189 out = sys.stderr 190 191 print(text, file = out); 192 sys.stdout.flush() 193 sys.stderr.flush() 194 195 return test_failed 170 try : 171 # print formated name 172 name_txt = "%20s " % t.name 173 174 #run the test instance and collect the result 175 test_failed, error = run_single_test(t, generate, dry_run, debug) 176 177 # update output based on current action 178 if generate : 179 failed_txt = "ERROR" 180 success_txt = "Done" 181 else : 182 failed_txt = "FAILED" 183 success_txt = "PASSED" 184 185 #print result with error if needed 186 text = name_txt + (failed_txt if test_failed else success_txt) 187 out = sys.stdout 188 if error : 189 text = text + "\n" + error 190 out = sys.stderr 191 192 print(text, file = out); 193 sys.stdout.flush() 194 sys.stderr.flush() 195 return test_failed 196 197 except KeyboardInterrupt: 198 test_failed = True 199 196 200 197 201 # run the given list of tests with the given parameters … … 209 213 pool = Pool(jobs) 210 214 try : 211 results = pool.map_async(partial(run_test_instance, generate=generate, dry_run=dry_run, debug=debug), tests ).get(9999 9999)215 results = pool.map_async(partial(run_test_instance, generate=generate, dry_run=dry_run, debug=debug), tests ).get(9999) 212 216 except KeyboardInterrupt: 213 217 pool.terminate() -
src/tests/tupleVariadic.c
rc0aa336 rb4d65c7 29 29 } 30 30 31 forall( otype T, ttype Params | { void ?{}(T *, Params); })31 forall( dtype T, ttype Params | sized(T) | { void ?{}(T *, Params); } ) 32 32 T * new(Params p); 33 33
Note: See TracChangeset
for help on using the changeset viewer.