Skip to content

Commit

Permalink
runnable/issue22854.d: Reduce code expansion to speed up testsuite
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuclaw authored and dlang-bot committed Jan 3, 2023
1 parent 2549fe3 commit fc695ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/test/runnable/issue22854.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
void main()
{
uint loops = 0;
static foreach (i; 0 .. 50)
static foreach (i; 0 .. 5)
{
static foreach (ch; SomeContainer().range)
loops++;
}
assert(loops == 50 * 50);
assert(loops == 5 * 5);
}

struct SomeContainer
Expand All @@ -20,7 +20,7 @@ struct TypeWithDestructor { ~this() { } }

struct SomeRange
{
int count = 50;
int count = 5;
int front() { return count; }
bool empty() { return count <= 0; }
void popFront() { count--; }
Expand Down

0 comments on commit fc695ff

Please sign in to comment.