Skip to content

Commit 9d1fe94

Browse files
committed
Change some makefile build stuff
1 parent 103f69c commit 9d1fe94

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

include/matgui/view.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99

1010
#include "matsig.h"
1111
#include "memberproperties.h"
12-
#include "style.h"
12+
#include "paint.h"
13+
#include <string>
1314

1415
namespace matgui {
1516

@@ -47,7 +48,7 @@ class View {
4748

4849
//! Trigger a redraw
4950
virtual void invalidate();
50-
virtual void refresh(){};
51+
virtual void refresh() {};
5152
virtual void updateStyle() {
5253
currentStyle = style;
5354
currentStyle += hoverStyle;

tests/Makefile

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,20 @@ RUNSTRING=./${TARGET}
44
OBJECTS=signal-test.o font-test.o shadertranslate-test.o
55
LIBS= -lpthread `sdl2-config --libs` -lGL -lSDL2_ttf -lSDL2_image
66
CXXFLAGS=-g -std=c++14 -O0 `sdl2-config --cflags` -I"../include/" -Imls-unit-test
7+
CXXFLAGS=-g -std=c++17 -O0 `sdl2-config --cflags` -I"../include/" -Imls-unit-test
78
CXXFLAGS+= -MMD -MF $*.d # For calculating dependencies
89
TESTS=${OBJECTS:.o= }
910

1011
LINKFLAGS=${FLAGS} ../matgui-sdl.a ${LIBS}
1112

1213
all: ${TESTS}
1314

14-
%-test: %-test.o ../matgui-sdl.a
15+
main.o: mls-unit-test/test_main.cpp
16+
${CXX} -o $@ $< ${CXXFLAGS}
17+
18+
%-test: %-test.o ../matgui-sdl.a main.o
1519
@echo "test" $<
16-
${CXX} -o $@ $< ${LINKFLAGS}
20+
${CXX} -o $@ $< main.o ${LINKFLAGS} -std=c++17
1721

1822
-include *.d
1923

tests/signal-test.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
* Author: Mattias Larsson Sköld
66
*/
77

8-
//#define DO_NOT_CATCH_ERRORS
8+
// #define DO_NOT_CATCH_ERRORS
99

1010
#include "matgui/matsig.h"
1111
#include "mls-unit-test/unittest.h"
12-
#include <thread>
1312

1413
using namespace MatSig;
1514
using namespace std;
@@ -53,7 +52,7 @@ static void globalArgumentFunction(int i) {
5352
functionIsCalled = true;
5453
}
5554

56-
TEST_SUIT_BEGIN
55+
TEST_SUIT_BEGIN(MatguiSignal)
5756

5857
TEST_CASE("void signal callback") {
5958
Signal<void> signal;
@@ -136,6 +135,7 @@ TEST_CASE("lambda void argument function") {
136135
flushSignals();
137136

138137
ASSERT(isCalled, "the function not called");
138+
139139
ASSERT_EQ(y, 5);
140140

141141
isCalled = false;

0 commit comments

Comments
 (0)