Created
November 8, 2019 07:03
-
-
Save zhaofeng-shu33/e361c17d8778051c1c128f287827d625 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Ubuntu 16.04, user root | |
add-apt-repository ppa:zhaofeng-shu33/gtest | |
apt update | |
apt install libgtest-dev | |
cat <<EOF >> gtest_example.cpp | |
#include <gtest/gtest.h> | |
TEST(MATH, ADD){ | |
EXPECT_EQ(1 + 3, 4); | |
} | |
EOF | |
g++ -lgtest_main -lgtest -lpthread gtest_example.cpp -o gtest_example | |
./gtest_example |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment