Skip to content

Commit 805fec7

Browse files
committed
Merge branch 'master' of https://github.com/Databean/warsofcatan
2 parents e804d8c + 24d27eb commit 805fec7

File tree

132 files changed

+18747
-134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+18747
-134
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,12 @@
1313
*.a
1414

1515
checkers-spike
16+
warsofcatan
17+
18+
*.d
19+
*.test
20+
/Default
21+
*.wocs
22+
23+
documentation/*
24+
/Debug

.project

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>warsofcatan</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
</buildSpec>
9+
<natures>
10+
</natures>
11+
</projectDescription>

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
language: cpp
2+
before_install:
3+
- sudo add-apt-repository ppa:antumdeluge/sdl2 -y
4+
- sudo apt-get update -y
5+
- sudo apt-get install libsdl2 libsdl2-dev libsdl2-ttf libsdl2-ttf-dev -y
6+
script: make tests

Doxyfile

Lines changed: 2304 additions & 0 deletions
Large diffs are not rendered by default.

Makefile

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,28 @@
11
export OBJ_HOME := $(realpath obj)
22
export SRC_HOME := $(realpath src)
33
export INCL_HOME := $(realpath include)
4-
EXECUTABLE := checkers-spike
4+
export TEST_LINK_FILES := $(realpath UnitTest++)/libUnitTest++.a
5+
export TEST_INCLUDE := $(realpath UnitTest++/src)
6+
export EXECUTABLE := warsofcatan
57
ALLFILES := $(wildcard $(SRC_HOME)/*) $(wildcard $(INCL_HOME)/*)
6-
export CXX := g++ -c
8+
export CXX := g++
79
export LD := g++
8-
export CXXFLAGS := -g -I$(INCL_HOME) -std=gnu++0x
9-
export LDFLAGS := -lSDL2 -lGL -lGLU
10+
export CXXFLAGS := -g -I$(INCL_HOME) -std=c++0x -I/usr/include/SDL2 -I/usr/local/include/SDL2 -Wall
11+
export LDFLAGS := -L/usr/local/lib -lSDL2 -lSDL2_ttf -lGL -lGLU -Wl,-R/usr/local/lib
1012

1113
.PHONY: all
1214
all: $(EXECUTABLE)
1315

1416
$(EXECUTABLE): $(ALLFILES)
1517
cd src && $(MAKE)
1618
${LD} obj/*.o $(LDFLAGS) -o $(EXECUTABLE)
19+
20+
.PHONY: tests
21+
tests: $(EXECUTABLE)
22+
cd UnitTest++ && $(MAKE) libUnitTest++.a
23+
cd tests && $(MAKE)
24+
25+
.PHONY: clean
26+
clean:
27+
rm -f $(EXECUTABLE)
28+
rm -f obj/*.o

UnitTest++/COPYING

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright (c) 2006 Noel Llopis and Charles Nicholson
2+
3+
Permission is hereby granted, free of charge, to any person obtaining
4+
a copy of this software and associated documentation files (the
5+
"Software"), to deal in the Software without restriction, including
6+
without limitation the rights to use, copy, modify, merge, publish,
7+
distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so, subject to
9+
the following conditions:
10+
11+
The above copyright notice and this permission notice shall be included
12+
in all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

UnitTest++/Makefile

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
CXX = g++
2+
CXXFLAGS ?= -g -Wall -W -ansi # -pedantic
3+
LDFLAGS ?=
4+
SED = sed
5+
MV = mv
6+
RM = rm
7+
8+
.SUFFIXES: .o .cpp
9+
10+
lib = libUnitTest++.a
11+
test = TestUnitTest++
12+
13+
src = src/AssertException.cpp \
14+
src/Test.cpp \
15+
src/Checks.cpp \
16+
src/TestRunner.cpp \
17+
src/TestResults.cpp \
18+
src/TestReporter.cpp \
19+
src/TestReporterStdout.cpp \
20+
src/ReportAssert.cpp \
21+
src/TestList.cpp \
22+
src/TimeConstraint.cpp \
23+
src/TestDetails.cpp \
24+
src/MemoryOutStream.cpp \
25+
src/DeferredTestReporter.cpp \
26+
src/DeferredTestResult.cpp \
27+
src/XmlTestReporter.cpp \
28+
src/CurrentTest.cpp
29+
30+
ifeq ($(MSYSTEM), MINGW32)
31+
src += src/Win32/TimeHelpers.cpp
32+
else
33+
src += src/Posix/SignalTranslator.cpp \
34+
src/Posix/TimeHelpers.cpp
35+
endif
36+
37+
test_src = src/tests/Main.cpp \
38+
src/tests/TestAssertHandler.cpp \
39+
src/tests/TestChecks.cpp \
40+
src/tests/TestUnitTest++.cpp \
41+
src/tests/TestTest.cpp \
42+
src/tests/TestTestResults.cpp \
43+
src/tests/TestTestRunner.cpp \
44+
src/tests/TestCheckMacros.cpp \
45+
src/tests/TestTestList.cpp \
46+
src/tests/TestTestMacros.cpp \
47+
src/tests/TestTimeConstraint.cpp \
48+
src/tests/TestTimeConstraintMacro.cpp \
49+
src/tests/TestMemoryOutStream.cpp \
50+
src/tests/TestDeferredTestReporter.cpp \
51+
src/tests/TestXmlTestReporter.cpp \
52+
src/tests/TestCurrentTest.cpp
53+
54+
objects = $(patsubst %.cpp, %.o, $(src))
55+
test_objects = $(patsubst %.cpp, %.o, $(test_src))
56+
dependencies = $(subst .o,.d,$(objects))
57+
test_dependencies = $(subst .o,.d,$(test_objects))
58+
59+
define make-depend
60+
$(CXX) $(CXXFLAGS) -M $1 | \
61+
$(SED) -e 's,\($(notdir $2)\) *:,$(dir $2)\1: ,' > $3.tmp
62+
$(SED) -e 's/#.*//' \
63+
-e 's/^[^:]*: *//' \
64+
-e 's/ *\\$$//' \
65+
-e '/^$$/ d' \
66+
-e 's/$$/ :/' $3.tmp >> $3.tmp
67+
$(MV) $3.tmp $3
68+
endef
69+
70+
71+
all: $(test)
72+
73+
74+
$(lib): $(objects)
75+
@echo Creating $(lib) library...
76+
@ar cr $(lib) $(objects)
77+
78+
$(test): $(lib) $(test_objects)
79+
@echo Linking $(test)...
80+
@$(CXX) $(LDFLAGS) -o $(test) $(test_objects) $(lib)
81+
@echo Running unit tests...
82+
@./$(test)
83+
84+
clean:
85+
-@$(RM) $(objects) $(test_objects) $(dependencies) $(test_dependencies) $(test) $(lib) 2> /dev/null
86+
87+
%.o : %.cpp
88+
@echo $<
89+
@$(call make-depend,$<,$@,$(subst .o,.d,$@))
90+
@$(CXX) $(CXXFLAGS) -c $< -o $(patsubst %.cpp, %.o, $<)
91+
92+
93+
ifneq "$(MAKECMDGOALS)" "clean"
94+
-include $(dependencies)
95+
-include $(test_dependencies)
96+
endif

UnitTest++/README

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
UnitTest++ README
2+
Version: v1.4
3+
Last update: 2008-10-30
4+
5+
UnitTest++ is free software. You may copy, distribute, and modify it under
6+
the terms of the License contained in the file COPYING distributed
7+
with this package. This license is the same as the MIT/X Consortium
8+
license.
9+
10+
See src/tests/TestUnitTest++.cpp for usage.
11+
12+
Authors:
13+
Noel Llopis ([email protected])
14+
Charles Nicholson ([email protected])
15+
16+
Contributors:
17+
Jim Tilander
18+
Kim Grasman
19+
Jonathan Jansson
20+
Dirck Blaskey
21+
Rory Driscoll
22+
Dan Lind
23+
Matt Kimmel -- Submitted with permission from Blue Fang Games
24+
Anthony Moralez
25+
Jeff Dixon
26+
Randy Coulman
27+
Lieven van der Heide
28+
29+
Release notes:
30+
--------------
31+
Version 1.4 (2008-10-30)
32+
- CHECK macros work at arbitrary stack depth from inside TESTs.
33+
- Remove obsolete TEST_UTILITY macros
34+
- Predicated test execution (via TestRunner::RunTestsIf)
35+
- Better exception handling for fixture ctors/dtors.
36+
- VC6/7/8/9 support
37+
38+
Version 1.3 (2007-4-22)
39+
- Removed dynamic memory allocations (other than streams)
40+
- MinGW support
41+
- Consistent (native) line endings
42+
- Minor bug fixing
43+
44+
Version 1.2 (2006-10-29)
45+
- First pass at documentation.
46+
- More detailed error crash catching in fixtures.
47+
- Standard streams used for printing objects under check. This should allow the
48+
use of standard class types such as std::string or other custom classes with
49+
stream operators to ostream.
50+
- Standard streams can be optionally compiled off by defining UNITTEST_USE_CUSTOM_STREAMS
51+
in Config.h
52+
- Added named test suites
53+
- Added CHECK_ARRAY2D_CLOSE
54+
- Posix library name is libUnitTest++.a now
55+
- Floating point numbers are postfixed with f in the failure reports
56+
57+
Version 1.1 (2006-04-18)
58+
- CHECK macros do not have side effects even if one of the parameters changes state
59+
- Removed CHECK_ARRAY_EQUAL (too similar to CHECK_ARRAY_CLOSE)
60+
- Added local and global time constraints
61+
- Removed dependencies on strstream
62+
- Improved Posix signal to exception translator
63+
- Failing tests are added to Visual Studio's error list
64+
- Fixed Visual Studio projects to work with spaces in directories
65+
66+
Version 1.0 (2006-03-15)
67+
- Initial release
68+

0 commit comments

Comments
 (0)