You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
waf/playground/gtest/tests/test0/HelloWorldTest.cpp

24 lines
453 B
C++

#include "gtest/gtest.h"
#include "HelloWorld.h"
#include <string>
using namespace std;
TEST(HelloWorldTest, test0)
{
HelloWorld hello;
string expected("Hello World");
ASSERT_EQ(expected, hello.message());
}
TEST(HelloWorldTest, test1)
{
string expected("Hola Mundo");
HelloWorld hello(expected);
ASSERT_EQ(expected, hello.message());
expected = "Hello, world!";
hello.setMessage(expected);
ASSERT_EQ(expected, hello.message());
}