Commit 3a75baf4 authored by Gluttton's avatar Gluttton

Fix compile tests on linux gcc 4.8.1. Add include guard (pragma once) in…

Fix compile tests on linux gcc 4.8.1. Add include guard (pragma once) in boolinq.h, add Makefile, add explicit include of <climits>, comment code which use std::vector of const int, clarify typenames inside utility templates.
parent c38956bc
#include <vector>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "boolinq.h"
......
#include <vector>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "boolinq.h"
......
#include <list>
#include <vector>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "boolinq.h"
......
#include <vector>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "CommonTests.h"
......
#include <vector>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "CommonTests.h"
......
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "CommonTests.h"
......
#include <vector>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "boolinq.h"
......
#include <list>
#include <vector>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "boolinq.h"
......
#include <vector>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "CommonTests.h"
......
......@@ -3,6 +3,7 @@
#include <vector>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "CommonTests.h"
......
#include <vector>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "boolinq.h"
......
......@@ -2,6 +2,7 @@
#include <vector>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "boolinq.h"
......
#include <vector>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "CommonTests.h"
......
......@@ -3,6 +3,7 @@
#include <vector>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "CommonTests.h"
......
......@@ -3,6 +3,7 @@
#include <vector>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "boolinq.h"
......
OPTIMIZATION ?= O0
ifdef COV
COVERAGE = -fprofile-arcs -ftest-coverage
endif
ifdef PROF
PROFILE = -pg
endif
CXX = g++
INCLUDES = -I.
CXXFLAGS = -c \
-MD \
-std=c++11 -march=native -mtune=native \
-Wall -Wextra \
-$(OPTIMIZATION) \
$(COVERAGE) \
$(PROFILE)
LDPATH =
LDADD = -lgtest -lgtest_main -lpthread \
$(COVERAGE) \
$(PROFILE)
SRC = AllTest.cpp \
AnyTest.cpp \
AvgTest.cpp \
BitsRangeTest.cpp \
BytesRangeTest.cpp \
ConcatRangeTest.cpp \
ContainsTest.cpp \
CountTest.cpp \
DistinctRangeTest.cpp \
DotCallTest.cpp \
ElementAtTest.cpp \
ForeachTest.cpp \
GroupByRangeTest.cpp \
IterRangeTest.cpp \
LinqTest.cpp \
MaxTest.cpp \
MinTest.cpp \
OrderByRangeTest.cpp \
ReverseRangeTest.cpp \
SelectRangeTest.cpp \
SkipRangeTest.cpp \
SkipWhileRangeTest.cpp \
SpeedTest.cpp \
SumTest.cpp \
TakeRangeTest.cpp \
TakeWhileRangeTest.cpp \
ToDequeTest.cpp \
ToListTest.cpp \
ToSetTest.cpp \
ToVectorTest.cpp \
UnbitsRangeTest.cpp \
UnbytesRangeTest.cpp \
WhereRangeTest.cpp
OBJ = $(SRC:.cpp=.o)
TEST = boolinqtest
COV_DATA = $(shell find . -type f -name '*.d' -o -name '*.gcov' -o -name '*.gcda' -o -name '*.gcno' -o -name 'coverage' -o -name 'coverage.info')
PRO_DATA = $(shell find . -type f -name 'gmon.out')
TMP_DATA = $(shell find . -type f -name '*~')
all: $(TEST)
$(TEST): $(OBJ)
$(CXX) $(OBJ) $(LDPATH) $(LDADD) -o $@
.cpp.o:
$(CXX) $(CXXFLAGS) $(INCLUDES) $< -o $@
clean:
rm -rf $(OBJ) $(TEST) $(TMP_DATA) $(COV_DATA) $(PRO_DATA)
coverage:
lcov -q -c -f -b . -d . -o coverage.info &&\
lcov -q -r coverage.info /usr/\* -b . -d . -o coverage.info &&\
genhtml coverage.info --demangle-cpp --legend -f -q -o coverage
profile:
gprof $(TEST) gmon.out -b -Q
#include <vector>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "boolinq.h"
......
#include <vector>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "boolinq.h"
......
#include <vector>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "CommonTests.h"
......
......@@ -3,6 +3,7 @@
#include <vector>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "CommonTests.h"
......
#include <vector>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "CommonTests.h"
......
#include <vector>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "CommonTests.h"
......
#include <vector>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "CommonTests.h"
......
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <iostream>
......
#include <list>
#include <vector>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "boolinq.h"
......
#include <vector>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "CommonTests.h"
......
#include <vector>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "CommonTests.h"
......
......@@ -2,6 +2,7 @@
#include <deque>
#include <vector>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "CommonTests.h"
......
#include <deque>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "boolinq.h"
......
#include <list>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "boolinq.h"
......
#include <vector>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "boolinq.h"
......
#include <vector>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "boolinq.h"
......
#include <vector>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "CommonTests.h"
......
#include <vector>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "CommonTests.h"
......
#include <vector>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "CommonTests.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment