Changeset 830
- Timestamp:
- 12/31/10 18:27:06 (14 years ago)
- Files:
-
- trunk/test/Makefile (modified) (1 diff)
- trunk/test/runnable/test4.d (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/test/Makefile
r817 r830 88 88 runnable_test_results=$(addsuffix .out,$(addprefix $(RESULTS_DIR)/,$(runnable_tests))) 89 89 90 90 compilable_tests=$(wildcard compilable/*.d) 91 91 compilable_test_results=$(addsuffix .out,$(addprefix $(RESULTS_DIR)/,$(compilable_tests))) 92 92 93 93 fail_compilation_tests=$(wildcard fail_compilation/*.d) 94 94 fail_compilation_test_results=$(addsuffix .out,$(addprefix $(RESULTS_DIR)/,$(fail_compilation_tests))) 95 95 96 96 all: run_tests 97 97 98 98 ifeq ($(MODEL),64) 99 99 DISABLED_TESTS = a20 100 100 DISABLED_TESTS += cov2 101 101 DISABLED_TESTS += hello-profile 102 102 DISABLED_TESTS += sieve 103 103 # coverage / tracing is broken 104 104 105 105 DISABLED_TESTS += arrayop 106 106 # value isn't making it into the runtime library call for some reason 107 107 108 DISABLED_TESTS += builtin109 108 DISABLED_TESTS += integrate 110 109 DISABLED_TESTS += testmath 111 110 # needs std.math 112 113 DISABLED_TESTS += delegate114 # array literal with delegate115 111 116 112 DISABLED_TESTS += eh2 117 113 DISABLED_TESTS += test4 118 114 DISABLED_TESTS += test12 119 115 DISABLED_TESTS += test42 120 116 DISABLED_TESTS += testsignals 121 117 DISABLED_TESTS += xtest46 122 118 # hangs at exit, somewhere in atomic code? 123 119 124 120 DISABLED_TESTS += foreach4 125 121 # iterate over dstring as char returning bad results 126 122 127 123 DISABLED_TESTS += hospital 128 124 # int vs long issues 129 125 130 126 DISABLED_TESTS += interpret 131 127 # array literal with struct 132 128 133 129 DISABLED_TESTS += s2ir 134 130 DISABLED_TESTS += test16 135 131 DISABLED_TESTS += test20 136 132 DISABLED_TESTS += test28 137 133 # -fPIC: transition from R_X86_64_TLSGD to R_X86_64_GOTTPOFF against 138 134 139 135 DISABLED_TESTS += stress 140 136 # hangs off in the gc 141 137 142 DISABLED_TESTS += template4143 # segv's off in an opCall, not clear why144 145 138 DISABLED_TESTS += test11 146 139 # array append issues? test33 147 140 148 141 DISABLED_TESTS += test22 149 142 # has x86 specific asm code that needs translation 150 143 151 144 DISABLED_TESTS += test34 152 145 DISABLED_TESTS += testformat 153 146 # looks like lots of issues with std.format, at least array and aa formatting is borked.. 154 147 155 148 DISABLED_TESTS += test7 156 149 # interesting array manipulation test fails 157 150 158 151 DISABLED_TESTS += test8 159 152 # segv in rt.deh2.__eh_find_caller 160 153 161 154 DISABLED_TESTS += testaa2 162 155 # aa.values returns wrong data 163 156 164 157 DISABLED_TESTS += testaa trunk/test/runnable/test4.d
r713 r830 1 1 // PERMUTE_ARGS: 2 2 // REQUIRED_ARGS: -d 3 3 4 4 import core.exception; 5 5 import core.stdc.math; 6 import core.vararg; 6 7 7 8 extern(C) 8 9 { 9 10 int atoi(const char*); 10 11 int memcmp(const void*, const void*, size_t); 11 12 int printf(const char*, ...); 12 13 } 13 14 14 15 int cmp(const(char)[] s1, const(char)[] s2) 15 16 { 16 17 assert(s1.length == s2.length); 17 18 18 19 return memcmp(s1.ptr, s2.ptr, s1.length); 19 20 } 20 21 21 22 /* ================================ */ 22 23 23 24 void test1() 24 25 { 25 26 int i; … … 1355 1356 1356 1357 try 1357 1358 { 1358 1359 try 1359 1360 { 1360 1361 status++; 1361 1362 assert(status==1); 1362 1363 throw new Exception("first"); 1363 1364 } 1364 1365 finally 1365 1366 { 1366 1367 printf("finally\n"); 1367 1368 status++; 1368 1369 assert(status==2); 1369 1370 status++; 1370 1371 throw new Exception("second"); 1371 1372 } 1372 1373 } 1373 1374 catch(Exception e) 1374 1375 { 1375 printf("catch %.*s\n", e.msg );1376 printf("catch %.*s\n", e.msg.length, e.msg.ptr); 1376 1377 assert(e.msg == "second"); 1377 1378 //assert(e.msg == "first"); 1378 1379 //assert(e.next.msg == "second"); 1379 1380 assert(status==3); 1380 1381 } 1381 1382 printf("success54\n"); 1382 1383 } 1383 1384 1384 1385 /* ================================ */ 1385 1386 1386 1387 void foo55() 1387 1388 { 1388 1389 try 1389 1390 { 1390 1391 Exception x = new Exception("second"); 1391 1392 printf("inner throw %p\n", x); 1392 1393 throw x; 1393 1394 } 1394 1395 catch (Exception e) 1395 1396 { 1396 1397 printf("inner catch %p\n", e); 1397 printf("e.msg == %.*s\n", e.msg );1398 printf("e.msg == %.*s\n", e.msg.length, e.msg.ptr); 1398 1399 assert(e.msg == "second"); 1399 1400 //assert(e.msg == "first"); 1400 1401 //assert(e.next.msg == "second"); 1401 1402 } 1402 1403 } 1403 1404 1404 1405 void test55() 1405 1406 { 1406 1407 int status=0; 1407 1408 try{ 1408 1409 try{ 1409 1410 status++; 1410 1411 assert(status==1); 1411 1412 Exception x = new Exception("first"); 1412 1413 printf("outer throw %p\n", x); 1413 1414 throw x; 1414 1415 }finally{ 1415 1416 printf("finally\n"); 1416 1417 status++; 1417 1418 assert(status==2);
