diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile | 16 | ||||
-rw-r--r-- | tests/test-webserver.cpp | 7 |
2 files changed, 7 insertions, 16 deletions
diff --git a/tests/Makefile b/tests/Makefile index 2f0e809..8529d6d 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -26,12 +26,8 @@ TESTSRC=\ $(PROGSRC) build: $(PROJECTNAME) - +set -e ; for i in $(PLUGINS) ; do make -C plugins/$$i ; done ./$(PROJECTNAME) -all: build - ./webserver -c webserver.conf - $(PROJECTNAME): ../libcommon/libcommon.a $(TESTSRC:.cpp=.o) $(CXX) $(LDFLAGS) $^ $(LDLIBS) $(LIBS) -o $@ @@ -43,18 +39,6 @@ dep: $(TESTSRC:.cpp=.d) %.o: %.cpp %.d $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@ -install: - mkdir -p $(DESTDIR)/usr/bin - cp webserver $(DESTDIR)/usr/bin - - mkdir -p $(DESTDIR)/usr/lib/webserver/plugins - set -e ; for i in $(PLUGINS) ; do make -C plugins/$$i install ; done - - mkdir -p $(DESTDIR)/usr/local/lib/webserver/plugins - - #mkdir -p $(DESTDIR)/etc - #cp webserver.conf $(DESTDIR)/etc/webserver.conf - # misc --------------------------------------------------- clean: diff --git a/tests/test-webserver.cpp b/tests/test-webserver.cpp index f7020af..5838dfa 100644 --- a/tests/test-webserver.cpp +++ b/tests/test-webserver.cpp @@ -36,6 +36,13 @@ TEST(property_tree, put) EXPECT_EQ(ss.str(), "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<list><listentry type=\"file1\">name1.txt</listentry><listentry type=\"file2\">name2.txt</listentry></list>"); } +TEST(string, stoul) +{ + unsigned long l = std::stoul("-1"); + + EXPECT_EQ(l, std::numeric_limits<unsigned long>::max()); +} + int main(int argc, char* argv[]) { ::testing::InitGoogleMock(&argc, argv); |