Skip to content

Commit

Permalink
Add a test to validate druntime's trace code, see also dlang/druntime#58
Browse files Browse the repository at this point in the history
  • Loading branch information
braddr committed Aug 26, 2011
1 parent 524fa7b commit b0c4a2f
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions test/runnable/testprofile.d
@@ -0,0 +1,31 @@
// REQUIRED_ARGS: -profile

module testprofile;

// ------------------

struct FourUShort {
this(ushort a, ushort b, ushort c, ushort d) {
this.a = a;
this.b = b;
this.c = c;
this.d = d;
}
ushort a, b, c, d;
}

void test1()
{
auto f = FourUShort(0, 1, 2, 3);
assert(f.a == 0);
assert(f.b == 1);
assert(f.c == 2);
assert(f.d == 3);
}

// ------------------

void main()
{
test1();
}

0 comments on commit b0c4a2f

Please sign in to comment.