mirror of
https://github.com/falk-werner/webfuse-provider
synced 2026-03-02 04:09:18 +00:00
Merge commit 'b19a54d2f9d8a3e83366c638aace4cf3b5daa96e' as 'build/dobuild'
This commit is contained in:
18
build/dobuild/tests/fixtures/make-gtest-example/Makefile
vendored
Normal file
18
build/dobuild/tests/fixtures/make-gtest-example/Makefile
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# Makefile for gtest example
|
||||
|
||||
CPPFLAGS = -I /usr/local/include
|
||||
CXXFLAGS = -c -Wall
|
||||
LDFLAGS = -L /usr/local/lib -l gtest_main -l gtest -l pthread
|
||||
|
||||
TARGET = alltests
|
||||
OBJECTS = test_stringcompare.o
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(CXX) -o $@ $^ $(LD_FLAGS)
|
||||
|
||||
clean:
|
||||
rm -f $(TARGET) $(OBJECTS)
|
||||
|
||||
.PHONY: all clean
|
||||
18
build/dobuild/tests/fixtures/make-gtest-example/test_stringcompare.cpp
vendored
Normal file
18
build/dobuild/tests/fixtures/make-gtest-example/test_stringcompare.cpp
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
#include <gtest/gtest.h> // googletest header file
|
||||
|
||||
#include <string>
|
||||
using std::string;
|
||||
|
||||
char const actualValTrue[] = "hello gtest";
|
||||
char const actualValFalse[] = "hello world";
|
||||
char const expectVal[] = "hello gtest";
|
||||
|
||||
TEST(StrCompare, CStrEqual)
|
||||
{
|
||||
EXPECT_STREQ(expectVal, actualValTrue);
|
||||
}
|
||||
|
||||
TEST(StrCompare, CStrNotEqual)
|
||||
{
|
||||
EXPECT_STRNE(expectVal, actualValFalse);
|
||||
}
|
||||
Reference in New Issue
Block a user