Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ DEBUG_FLAGS=$(PIC_FLAG) -g

export DMD_TEST_COVERAGE=

runnable_tests=$(wildcard runnable/*.d) $(wildcard runnable/*.sh)
runnable_tests=$(wildcard runnable/*.d runnable/*.har runnable/*.sh)
runnable_test_results=$(addsuffix .out,$(addprefix $(RESULTS_DIR)/,$(runnable_tests)))

compilable_tests=$(wildcard compilable/*.d) $(wildcard compilable/*.sh)
compilable_tests=$(wildcard compilable/*.d compilable/*.har compilable/*.sh)
compilable_test_results=$(addsuffix .out,$(addprefix $(RESULTS_DIR)/,$(compilable_tests)))

fail_compilation_tests=$(wildcard fail_compilation/*.d) $(wildcard fail_compilation/*.html)
fail_compilation_tests=$(wildcard fail_compilation/*.d fail_compilation/*.har fail_compilation/*.html)
fail_compilation_test_results=$(addsuffix .out,$(addprefix $(RESULTS_DIR)/,$(fail_compilation_tests)))

all: run_tests
Expand Down Expand Up @@ -167,13 +167,13 @@ start_fail_compilation_tests: $(RESULTS_DIR)/.created $(test_tools)
@echo "Running fail compilation tests"
$(QUIET)$(MAKE) --no-print-directory run_fail_compilation_tests

$(RESULTS_DIR)/d_do_test$(EXE): tools/d_do_test.d $(RESULTS_DIR)/.created
$(RESULTS_DIR)/d_do_test$(EXE): tools/d_do_test.d tools/archive/har.d $(RESULTS_DIR)/.created
@echo "Building d_do_test tool"
@echo "OS: '$(OS)'"
@echo "MODEL: '$(MODEL)'"
@echo "PIC: '$(PIC_FLAG)'"
$(DMD) -conf= $(MODEL_FLAG) $(DEBUG_FLAGS) -unittest -run $<
$(DMD) -conf= $(MODEL_FLAG) $(DEBUG_FLAGS) -od$(RESULTS_DIR) -of$(RESULTS_DIR)$(DSEP)d_do_test$(EXE) $<
$(DMD) -conf= $(MODEL_FLAG) $(DEBUG_FLAGS) -unittest tools/archive/har.d -run $<
$(DMD) -conf= $(MODEL_FLAG) $(DEBUG_FLAGS) -od$(RESULTS_DIR) -of$(RESULTS_DIR)$(DSEP)d_do_test$(EXE) $< tools/archive/har.d

$(RESULTS_DIR)/sanitize_json$(EXE): tools/sanitize_json.d $(RESULTS_DIR)/.created
@echo "Building sanitize_json tool"
Expand Down
7 changes: 7 additions & 0 deletions test/compilable/a3682.d → test/compilable/a3682.har
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
--- a3682.d
// COMPILED_IMPORTS: imports/b3682.d
// PERMUTE_ARGS:

Expand All @@ -18,3 +19,9 @@ struct Tuple(Types...)
static assert(is(typeof(s) == Tuple!(float)));
}
}

--- imports/b3682.d
module imports.b3682;

import a3682;
alias Tuple!(int) tint;
19 changes: 0 additions & 19 deletions test/compilable/art4769.d

This file was deleted.

46 changes: 46 additions & 0 deletions test/compilable/art4769.har
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
--- art4769.d
// http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.bugs&article_id=4769

// COMPILED_IMPORTS: imports/art4769a.d imports/art4769b.d
// PERMUTE_ARGS:

module art4769;

private import imports.art4769a;

struct Vector(T)
{
DataStreamability!(T).footype f;

static if (DataStreamability!(T).isStreamable)
void writeTo()
{
}
}

--- imports/art4769a.d
module imports.art4769a;

import core.stdc.stdio;

template DataStreamability(T)
{
const int isStreamable = true;
alias T footype;

void write()
{
printf("hallo\n");
}
}

--- imports/art4769b.d
private import imports.art4769a;
private import art4769;

int main(char [][] args)
{
Vector!(wchar) str;
return 0;
}

32 changes: 32 additions & 0 deletions test/compilable/harexample.har
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
--- main.d
/*
PERMUTE_ARGS:
*/
import ibar, ibaz;
void main()
{
ibarfunc();
ibazfunc();
}

--- ibar.d
import bar, std.stdio;
void ibarfunc()
{
writeln(thing);
}

--- ibaz.d
import baz, std.stdio;
void ibazfunc()
{
writeln(thing);
}

--- bar.d
module baz;
enum thing = "this is baz from bar.d";

--- baz.d
module bar;
enum thing = "this is bar from baz.d";
15 changes: 0 additions & 15 deletions test/compilable/imports/art4769a.d

This file was deleted.

9 changes: 0 additions & 9 deletions test/compilable/imports/art4769b.d

This file was deleted.

5 changes: 0 additions & 5 deletions test/compilable/imports/b3682.d

This file was deleted.

Loading