Unverified Commit 0ffa5f97 authored by Chris Johnson's avatar Chris Johnson Committed by GitHub
Browse files

Merge branch 'master' into chore/fix_library_json

parents 0c0ca903 3880b13e
...@@ -41,8 +41,6 @@ ...@@ -41,8 +41,6 @@
# elif defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__) # elif defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__)
# define GTEST_OS_WINDOWS_MINGW 1 # define GTEST_OS_WINDOWS_MINGW 1
# define GTEST_OS_WINDOWS 1 # define GTEST_OS_WINDOWS 1
#elif defined __SYMBIAN32__
# define GTEST_OS_SYMBIAN 1
#elif defined _WIN32 #elif defined _WIN32
# define GTEST_OS_WINDOWS 1 # define GTEST_OS_WINDOWS 1
# ifdef _WIN32_WCE # ifdef _WIN32_WCE
......
...@@ -31,12 +31,11 @@ ...@@ -31,12 +31,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Type utilities needed for implementing typed and type-parameterized // Type utilities needed for implementing typed and type-parameterized
// tests. This file is generated by a SCRIPT. DO NOT EDIT BY HAND! // tests. This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
// //
// Currently we support at most 50 types in a list, and at most 50 // Currently we support at most 50 types in a list, and at most 50
// type-parameterized tests in one type-parameterized test case. // type-parameterized tests in one type-parameterized test suite.
// Please contact googletestframework@googlegroups.com if you need // Please contact googletestframework@googlegroups.com if you need
// more. // more.
...@@ -3312,8 +3311,8 @@ struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, ...@@ -3312,8 +3311,8 @@ struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
}; };
// The TypeList template makes it possible to use either a single type // The TypeList template makes it possible to use either a single type
// or a Types<...> list in TYPED_TEST_CASE() and // or a Types<...> list in TYPED_TEST_SUITE() and
// INSTANTIATE_TYPED_TEST_CASE_P(). // INSTANTIATE_TYPED_TEST_SUITE_P().
template <typename T> template <typename T>
struct TypeList { struct TypeList {
......
...@@ -34,7 +34,7 @@ $var n = 50 $$ Maximum length of type lists we want to support. ...@@ -34,7 +34,7 @@ $var n = 50 $$ Maximum length of type lists we want to support.
// tests. This file is generated by a SCRIPT. DO NOT EDIT BY HAND! // tests. This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
// //
// Currently we support at most $n types in a list, and at most $n // Currently we support at most $n types in a list, and at most $n
// type-parameterized tests in one type-parameterized test case. // type-parameterized tests in one type-parameterized test suite.
// Please contact googletestframework@googlegroups.com if you need // Please contact googletestframework@googlegroups.com if you need
// more. // more.
...@@ -291,8 +291,8 @@ struct Templates<$for j, [[T$j]]$for k[[, NoneT]]> { ...@@ -291,8 +291,8 @@ struct Templates<$for j, [[T$j]]$for k[[, NoneT]]> {
]] ]]
// The TypeList template makes it possible to use either a single type // The TypeList template makes it possible to use either a single type
// or a Types<...> list in TYPED_TEST_CASE() and // or a Types<...> list in TYPED_TEST_SUITE() and
// INSTANTIATE_TYPED_TEST_CASE_P(). // INSTANTIATE_TYPED_TEST_SUITE_P().
template <typename T> template <typename T>
struct TypeList { struct TypeList {
......
...@@ -16,6 +16,9 @@ ...@@ -16,6 +16,9 @@
# Remember to tweak this if you move this file. # Remember to tweak this if you move this file.
GTEST_DIR = .. GTEST_DIR = ..
# Points to the location of the Google Test libraries
GTEST_LIB_DIR = .
# Where to find user code. # Where to find user code.
USER_DIR = ../samples USER_DIR = ../samples
...@@ -27,6 +30,9 @@ CPPFLAGS += -isystem $(GTEST_DIR)/include ...@@ -27,6 +30,9 @@ CPPFLAGS += -isystem $(GTEST_DIR)/include
# Flags passed to the C++ compiler. # Flags passed to the C++ compiler.
CXXFLAGS += -g -Wall -Wextra -pthread -std=c++11 CXXFLAGS += -g -Wall -Wextra -pthread -std=c++11
# Google Test libraries
GTEST_LIBS = libgtest.a libgtest_main.a
# All tests produced by this Makefile. Remember to add new tests you # All tests produced by this Makefile. Remember to add new tests you
# created to the list. # created to the list.
TESTS = sample1_unittest TESTS = sample1_unittest
...@@ -38,10 +44,10 @@ GTEST_HEADERS = $(GTEST_DIR)/include/gtest/*.h \ ...@@ -38,10 +44,10 @@ GTEST_HEADERS = $(GTEST_DIR)/include/gtest/*.h \
# House-keeping build targets. # House-keeping build targets.
all : $(TESTS) all : $(GTEST_LIBS) $(TESTS)
clean : clean :
rm -f $(TESTS) gtest.a gtest_main.a *.o rm -f $(GTEST_LIBS) $(TESTS) *.o
# Builds gtest.a and gtest_main.a. # Builds gtest.a and gtest_main.a.
...@@ -61,10 +67,10 @@ gtest_main.o : $(GTEST_SRCS_) ...@@ -61,10 +67,10 @@ gtest_main.o : $(GTEST_SRCS_)
$(CXX) $(CPPFLAGS) -I$(GTEST_DIR) $(CXXFLAGS) -c \ $(CXX) $(CPPFLAGS) -I$(GTEST_DIR) $(CXXFLAGS) -c \
$(GTEST_DIR)/src/gtest_main.cc $(GTEST_DIR)/src/gtest_main.cc
gtest.a : gtest-all.o libgtest.a : gtest-all.o
$(AR) $(ARFLAGS) $@ $^ $(AR) $(ARFLAGS) $@ $^
gtest_main.a : gtest-all.o gtest_main.o libgtest_main.a : gtest-all.o gtest_main.o
$(AR) $(ARFLAGS) $@ $^ $(AR) $(ARFLAGS) $@ $^
# Builds a sample test. A test should link with either gtest.a or # Builds a sample test. A test should link with either gtest.a or
...@@ -78,5 +84,5 @@ sample1_unittest.o : $(USER_DIR)/sample1_unittest.cc \ ...@@ -78,5 +84,5 @@ sample1_unittest.o : $(USER_DIR)/sample1_unittest.cc \
$(USER_DIR)/sample1.h $(GTEST_HEADERS) $(USER_DIR)/sample1.h $(GTEST_HEADERS)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/sample1_unittest.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/sample1_unittest.cc
sample1_unittest : sample1.o sample1_unittest.o gtest_main.a sample1_unittest : sample1.o sample1_unittest.o $(GTEST_LIBS)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -L$(GTEST_LIB_DIR) -lgtest_main -lpthread $^ -o $@
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -89,7 +89,6 @@ void PrintBytesInObjectToImpl(const unsigned char* obj_bytes, size_t count, ...@@ -89,7 +89,6 @@ void PrintBytesInObjectToImpl(const unsigned char* obj_bytes, size_t count,
// If the object size is bigger than kThreshold, we'll have to omit // If the object size is bigger than kThreshold, we'll have to omit
// some details by printing only the first and the last kChunkSize // some details by printing only the first and the last kChunkSize
// bytes. // bytes.
// FIXME: let the user control the threshold using a flag.
if (count < kThreshold) { if (count < kThreshold) {
PrintByteSegmentInObjectTo(obj_bytes, 0, count, os); PrintByteSegmentInObjectTo(obj_bytes, 0, count, os);
} else { } else {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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