Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/simpleini.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwatercal <brofield@users.noreply.github.com>2020-06-16 17:57:49 +0300
committerwatercal <brofield@users.noreply.github.com>2020-06-16 17:57:49 +0300
commitff3ba14154eedec7f3f1b29a403cc072ca6846c2 (patch)
tree922ee506e3f4fee7af59f42a02534273dedecd3c
parent3fea945de7264e7a6ae058211203a7f2b1a42b9d (diff)
Fixing build on linux
-rw-r--r--Makefile16
-rw-r--r--other/Makefile28
-rw-r--r--tests/.gitignore4
-rw-r--r--tests/Makefile20
-rw-r--r--tests/ts-roundtrip.cpp2
-rw-r--r--tests/ts-snippets.cpp2
-rw-r--r--tests/ts-utf8.cpp2
7 files changed, 43 insertions, 31 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..d69ea94
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,16 @@
+help:
+ @echo This makefile is just for the test program \(use \"make clean all test\"\)
+ @echo Just include the SimpleIni.h header file to use it.
+
+install:
+ @echo No install required. Just include the SimpleIni.h header file to use it.
+
+TOPTARGETS := all clean test
+
+SUBDIRS := tests
+
+$(TOPTARGETS): $(SUBDIRS)
+$(SUBDIRS):
+ $(MAKE) -C $@ $(MAKECMDGOALS)
+
+.PHONY: $(TOPTARGETS) $(SUBDIRS)
diff --git a/other/Makefile b/other/Makefile
deleted file mode 100644
index a04b5e3..0000000
--- a/other/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-CC=g++
-CFLAGS=-Wall
-CPPFLAGS=-Wall
-
-OBJS=testsi.o test1.o snippets.o ConvertUTF.o
-
-help:
- @echo This makefile is just for the test program \(use \"make clean all test\"\)
- @echo Just include the SimpleIni.h header file to use it.
-
-all: $(OBJS)
- $(CC) -o testsi $(OBJS)
-
-clean:
- rm -f core *.o testsi
-
-data:
- sed 's/\r\n$$/\n/g' < test1-expected.ini > unix.out
- mv unix.out test1-expected.ini
-
-test: testsi
- ./testsi -u -m -l test1-input.ini > test1-blah.ini
- diff test1-output.ini test1-expected.ini
-
-install:
- @echo No install required. Just include the SimpleIni.h header file to use it.
-
-testsi.o test1.o snippets.o : SimpleIni.h
diff --git a/tests/.gitignore b/tests/.gitignore
index 51ade18..7bc89f0 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -1 +1,5 @@
example2.ini
+
+tests
+*.o
+
diff --git a/tests/Makefile b/tests/Makefile
new file mode 100644
index 0000000..ae3082e
--- /dev/null
+++ b/tests/Makefile
@@ -0,0 +1,20 @@
+CC=g++
+CFLAGS=-Wall -std=c++11
+CPPFLAGS=-Wall -std=c++11
+LDFLAGS=-lpthread -lgtest -lgtest_main -lpthread -L/usr/lib
+
+OBJS=ts-roundtrip.o ts-snippets.o ts-utf8.o
+
+BIN=./tests
+
+all: $(OBJS)
+ $(CC) -o $(BIN) $(OBJS) $(LDFLAGS)
+
+clean:
+ rm -f core $(OBJS) $(BIN)
+
+test: $(BIN)
+ $(BIN)
+
+$(OBJS): ../SimpleIni.h
+
diff --git a/tests/ts-roundtrip.cpp b/tests/ts-roundtrip.cpp
index 3808a08..d4e663a 100644
--- a/tests/ts-roundtrip.cpp
+++ b/tests/ts-roundtrip.cpp
@@ -4,7 +4,7 @@
class TestRoundTrip : public ::testing::Test {
protected:
- void TestRoundTrip::SetUp() override;
+ void SetUp() override;
void TestMulti();
void TestBOM(bool useBOM);
diff --git a/tests/ts-snippets.cpp b/tests/ts-snippets.cpp
index d18150e..8814e0b 100644
--- a/tests/ts-snippets.cpp
+++ b/tests/ts-snippets.cpp
@@ -143,7 +143,7 @@ TEST(TestSnippets, TestGettingValues) {
// output all of the items
CSimpleIniA::TNamesDepend::const_iterator it;
for (it = values.begin(); it != values.end(); ++it) {
- printf("value = '%s'\n", it->pItem);
+ //printf("value = '%s'\n", it->pItem);
}
diff --git a/tests/ts-utf8.cpp b/tests/ts-utf8.cpp
index 9208648..a463dc3 100644
--- a/tests/ts-utf8.cpp
+++ b/tests/ts-utf8.cpp
@@ -3,7 +3,7 @@
class TestUTF8 : public ::testing::Test {
protected:
- void TestUTF8::SetUp() override;
+ void SetUp() override;
protected:
CSimpleIniA ini;
};