Skip to content

Commit

Permalink
Merge pull request #5355 from ibuclaw/badtests
Browse files Browse the repository at this point in the history
Fix problematic tests for GDC's testsuite
  • Loading branch information
MartinNowak committed Feb 2, 2016
2 parents 76c6f8c + df6ac86 commit 9576302
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion test/compilable/iasm_labeloperand.d
@@ -1,4 +1,4 @@


version (D_InlineAsm_X86)
version = TestInlineAsm;
else version (D_InlineAsm_X86_64)
Expand Down
11 changes: 7 additions & 4 deletions test/runnable/builtin.d
Expand Up @@ -3,10 +3,13 @@ import std.stdio;
import std.math;
import core.bitop;

version (X86_64)
version = AnyX86;
else version (X86)
version = AnyX86;
version (DigitalMars)
{
version (X86_64)
version = AnyX86;
else version (X86)
version = AnyX86;
}

/*******************************************/

Expand Down
25 changes: 14 additions & 11 deletions test/runnable/casting.d
Expand Up @@ -211,19 +211,22 @@ void test14218()
assert(x == 0); // false, '0x00'
}

// Questionable but currently accepted
foreach (To; Seq!( float, double, real,
ifloat, idouble, ireal))
version (DigitalMars)
{
auto x = cast(To)null;
assert(x == 0); // 0i
}
// Questionable but currently accepted by DMD (but not GDC).
foreach (To; Seq!( float, double, real,
ifloat, idouble, ireal))
{
auto x = cast(To)null;
assert(x == 0); // 0i
}

// Internal error: backend/el.c in el_long()
//foreach (To; Seq!(cfloat, cdouble, creal))
//{
// static assert(!__traits(compiles, { auto x = cast(To)null; }));
//}
// Internal error: backend/el.c in el_long()
//foreach (To; Seq!(cfloat, cdouble, creal))
//{
// static assert(!__traits(compiles, { auto x = cast(To)null; }));
//}
}
}

/***************************************************/
Expand Down
1 change: 0 additions & 1 deletion test/runnable/untag.d
@@ -1,4 +1,3 @@
#!/home/aalexandre/dmd2/linux/bin/rdmd
// PERMUTE_ARGS:

import std.algorithm, std.ascii, std.conv, std.exception,
Expand Down

0 comments on commit 9576302

Please sign in to comment.