Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Changeset 830

Show
Ignore:
Timestamp:
12/31/10 18:27:06 (14 years ago)
Author:
braddr
Message:

Update test4 to get past the easy parts, still doesn't pass.
Update the Makefile to enable some now-passing tests.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/test/Makefile

    r817 r830  
    8888runnable_test_results=$(addsuffix .out,$(addprefix $(RESULTS_DIR)/,$(runnable_tests))) 
    8989 
    9090compilable_tests=$(wildcard compilable/*.d) 
    9191compilable_test_results=$(addsuffix .out,$(addprefix $(RESULTS_DIR)/,$(compilable_tests))) 
    9292 
    9393fail_compilation_tests=$(wildcard fail_compilation/*.d) 
    9494fail_compilation_test_results=$(addsuffix .out,$(addprefix $(RESULTS_DIR)/,$(fail_compilation_tests))) 
    9595 
    9696all: run_tests 
    9797 
    9898ifeq ($(MODEL),64) 
    9999DISABLED_TESTS = a20 
    100100DISABLED_TESTS += cov2 
    101101DISABLED_TESTS += hello-profile 
    102102DISABLED_TESTS += sieve 
    103103# coverage / tracing is broken 
    104104 
    105105DISABLED_TESTS += arrayop 
    106106# value isn't making it into the runtime library call for some reason 
    107107 
    108 DISABLED_TESTS += builtin 
    109108DISABLED_TESTS += integrate 
    110109DISABLED_TESTS += testmath 
    111110# needs std.math 
    112  
    113 DISABLED_TESTS += delegate 
    114 # array literal with delegate 
    115111 
    116112DISABLED_TESTS += eh2 
    117113DISABLED_TESTS += test4 
    118114DISABLED_TESTS += test12 
    119115DISABLED_TESTS += test42 
    120116DISABLED_TESTS += testsignals 
    121117DISABLED_TESTS += xtest46 
    122118# hangs at exit, somewhere in atomic code? 
    123119 
    124120DISABLED_TESTS += foreach4 
    125121# iterate over dstring as char returning bad results 
    126122 
    127123DISABLED_TESTS += hospital 
    128124# int vs long issues 
    129125 
    130126DISABLED_TESTS += interpret 
    131127# array literal with struct 
    132128 
    133129DISABLED_TESTS += s2ir 
    134130DISABLED_TESTS += test16 
    135131DISABLED_TESTS += test20 
    136132DISABLED_TESTS += test28 
    137133# -fPIC: transition from R_X86_64_TLSGD to R_X86_64_GOTTPOFF against 
    138134 
    139135DISABLED_TESTS += stress 
    140136# hangs off in the gc 
    141137 
    142 DISABLED_TESTS += template4 
    143 # segv's off in an opCall, not clear why 
    144  
    145138DISABLED_TESTS += test11 
    146139# array append issues? test33 
    147140 
    148141DISABLED_TESTS += test22 
    149142#  has x86 specific asm code that needs translation 
    150143 
    151144DISABLED_TESTS += test34 
    152145DISABLED_TESTS += testformat 
    153146# looks like lots of issues with std.format, at least array and aa formatting is borked.. 
    154147 
    155148DISABLED_TESTS += test7 
    156149# interesting array manipulation test fails 
    157150 
    158151DISABLED_TESTS += test8 
    159152# segv in rt.deh2.__eh_find_caller 
    160153 
    161154DISABLED_TESTS += testaa2 
    162155# aa.values returns wrong data 
    163156 
    164157DISABLED_TESTS += testaa 
  • trunk/test/runnable/test4.d

    r713 r830  
    11// PERMUTE_ARGS: 
    22// REQUIRED_ARGS: -d 
    33 
    44import core.exception; 
    55import core.stdc.math; 
     6import core.vararg; 
    67 
    78extern(C) 
    89{ 
    910    int atoi(const char*); 
    1011    int memcmp(const void*, const void*, size_t); 
    1112    int printf(const char*, ...); 
    1213} 
    1314 
    1415int cmp(const(char)[] s1, const(char)[] s2) 
    1516{ 
    1617    assert(s1.length == s2.length); 
    1718 
    1819    return memcmp(s1.ptr, s2.ptr, s1.length); 
    1920} 
    2021 
    2122/* ================================ */ 
    2223 
    2324void test1() 
    2425{ 
    2526    int i; 
     
    13551356 
    13561357    try 
    13571358    { 
    13581359        try 
    13591360        { 
    13601361            status++; 
    13611362            assert(status==1); 
    13621363            throw new Exception("first"); 
    13631364        } 
    13641365        finally 
    13651366        { 
    13661367            printf("finally\n"); 
    13671368            status++; 
    13681369            assert(status==2); 
    13691370            status++; 
    13701371            throw new Exception("second"); 
    13711372        } 
    13721373    } 
    13731374    catch(Exception e) 
    13741375    { 
    1375         printf("catch %.*s\n", e.msg); 
     1376        printf("catch %.*s\n", e.msg.length, e.msg.ptr); 
    13761377        assert(e.msg == "second"); 
    13771378        //assert(e.msg == "first"); 
    13781379        //assert(e.next.msg == "second"); 
    13791380        assert(status==3); 
    13801381    } 
    13811382    printf("success54\n"); 
    13821383} 
    13831384 
    13841385/* ================================ */ 
    13851386 
    13861387void foo55() 
    13871388{ 
    13881389    try 
    13891390    { 
    13901391    Exception x = new Exception("second"); 
    13911392    printf("inner throw %p\n", x); 
    13921393    throw x; 
    13931394    } 
    13941395    catch (Exception e) 
    13951396    { 
    13961397    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); 
    13981399    assert(e.msg == "second"); 
    13991400    //assert(e.msg == "first"); 
    14001401    //assert(e.next.msg == "second"); 
    14011402    } 
    14021403} 
    14031404 
    14041405void test55() 
    14051406{ 
    14061407    int status=0; 
    14071408    try{ 
    14081409        try{ 
    14091410            status++; 
    14101411            assert(status==1); 
    14111412            Exception x = new Exception("first"); 
    14121413            printf("outer throw %p\n", x); 
    14131414            throw x; 
    14141415        }finally{ 
    14151416            printf("finally\n"); 
    14161417            status++; 
    14171418            assert(status==2);