Skip to content

Commit

Permalink
merge test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Jul 2, 2011
1 parent 781df82 commit 52f8780
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 14 deletions.
28 changes: 14 additions & 14 deletions test/runnable/bug5962.d
@@ -1,14 +1,14 @@
// 5962

struct S
{
auto g()(){ return 1; }
const auto g()(){ return 2; }
}
void main()
{
auto ms = S();
assert(ms.g() == 1);
auto cs = const(S)();
assert(cs.g() == 2);
}
// 5962

struct S
{
auto g()(){ return 1; }
const auto g()(){ return 2; }
}
void main()
{
auto ms = S();
assert(ms.g() == 1);
auto cs = const(S)();
assert(cs.g() == 2);
}
17 changes: 17 additions & 0 deletions test/runnable/template9.d
@@ -1,5 +1,7 @@
// PERMUTE_ARGS:

module breaker;

import std.c.stdio;

/**********************************/
Expand Down Expand Up @@ -184,6 +186,21 @@ void test9()
assert((new CTest9()).f2() == 10);
}

/**********************************/
// 5015

import breaker;

static if (is(ElemType!(int))){}

template ElemType(T) {
alias _ElemType!(T).type ElemType;
}

template _ElemType(T) {
alias r type;
}

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

int main()
Expand Down
18 changes: 18 additions & 0 deletions test/runnable/xtest46.d
Expand Up @@ -3075,6 +3075,23 @@ ref func2521_7() {
return val;
}

/***************************************************/
// 5962

struct S156
{
auto g()(){ return 1; }
const auto g()(){ return 2; }
}

void test156()
{
auto ms = S156();
assert(ms.g() == 1);
auto cs = const(S156)();
assert(cs.g() == 2);
}

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

int main()
Expand Down Expand Up @@ -3234,6 +3251,7 @@ int main()
test153();
test154();
test155();
test156();

printf("Success\n");
return 0;
Expand Down

1 comment on commit 52f8780

@braddr
Copy link
Member

@braddr braddr commented on 52f8780 Jul 2, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you intended to remove test/runnable/bug5962.d since you merged it into xtest46. The file was instead line-ended corrected, I think.

Please sign in to comment.