Skip to content

Commit

Permalink
Remove phobos dependency from issue 4003 test case
Browse files Browse the repository at this point in the history
  • Loading branch information
9rnsr committed Dec 31, 2013
1 parent 78331fc commit 79f0913
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 14 deletions.
3 changes: 3 additions & 0 deletions test/compilable/imports/stdio4003.d
@@ -0,0 +1,3 @@
module imports.stdio4003;

import imports.typecons4003;
6 changes: 6 additions & 0 deletions test/compilable/imports/test4003a.d
@@ -0,0 +1,6 @@
module imports.test4003a;

import imports.typecons4003;

Tuple!(string) t;

6 changes: 0 additions & 6 deletions test/compilable/imports/test65a.d

This file was deleted.

22 changes: 22 additions & 0 deletions test/compilable/imports/typecons4003.d
@@ -0,0 +1,22 @@
module imports.typecons4003;

struct Tuple(T...)
{
alias T Types;
Types field;

ref Tuple!(Types[from .. to]) slice(uint from, uint to)()
{
return *cast(typeof(return) *) &(field[from]);
}

void test() //unittest
{
.Tuple!(int, string, float, double) a;
a.field[1] = "abc";
a.field[2] = 4.5;
auto s = a.slice!(1, 3);
static assert(is(typeof(s) == Tuple!(string, float)));
//assert(s.field[0] == "abc" && s.field[1] == 4.5);
}
}
6 changes: 6 additions & 0 deletions test/compilable/test4003.d
@@ -0,0 +1,6 @@
// EXTRA_SOURCES: imports/test4003a.d
// PERMUTE_ARGS:

import imports.stdio4003;
void main(){}

8 changes: 0 additions & 8 deletions test/compilable/test65.d

This file was deleted.

0 comments on commit 79f0913

Please sign in to comment.