Skip to content

Commit 8a573d2

Browse files
committed
same for unittest assert errors
1 parent 7f58022 commit 8a573d2

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

test/exceptions/Makefile

+7-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ QUIET:=
88

99
SRC:=src
1010
ROOT:=obj/$(OS)/$(MODEL)
11-
TESTS:=stderr_msg
11+
TESTS:=stderr_msg unittest_assert
1212

1313
ifneq (default,$(MODEL))
1414
MODEL_FLAG:=-m$(MODEL)
@@ -29,6 +29,12 @@ $(ROOT)/stderr_msg.done: $(ROOT)/stderr_msg
2929
$(QUIET)./$(ROOT)/stderr_msg $(RUN_ARGS) 2>&1 1>/dev/null | grep -qF "stderr_msg msg"
3030
@touch $@
3131

32+
$(ROOT)/unittest_assert.done: $(ROOT)/unittest_assert
33+
@echo Testing unittest_assert
34+
$(QUIET)./$(ROOT)/unittest_assert $(RUN_ARGS) 2>&1 1>/dev/null | grep -qF "unittest_assert msg"
35+
@touch $@
36+
37+
$(ROOT)/unittest_assert: DFLAGS+=-unittest
3238
$(ROOT)/%: $(SRC)/%.d
3339
$(QUIET)$(DMD) $(DFLAGS) -of$@ $<
3440

test/exceptions/src/unittest_assert.d

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
unittest
2+
{
3+
assert(0, "unittest_assert msg");
4+
}
5+
6+
void main()
7+
{
8+
}

0 commit comments

Comments
 (0)