Last active
August 29, 2015 14:20
-
-
Save mikedanese/9d08a42cf3eb2f524bde to your computer and use it in GitHub Desktop.
This file contains hidden or 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
cc_test( | |
name = "my_test", | |
srcs = ["my_test.cc"], | |
deps = ["//external:gtest/main"], | |
) |
This file contains hidden or 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
cc_library( | |
name = "main", | |
srcs = glob( | |
["src/*.cc"], | |
exclude = ["src/gtest-all.cc"] | |
), | |
hdrs = glob(["include/**/*.h"]), | |
includes = [ | |
".", | |
"include" | |
], | |
linkopts = ["-pthread"], | |
visibility = ["//visibility:public"], | |
) |
This file contains hidden or 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
#include "gtest/gtest.h" | |
TEST(FactorialTest, Negative) { | |
EXPECT_EQ(1, 1); | |
} |
This file contains hidden or 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
new_http_archive( | |
name = "gtest-repo", | |
url = "https://googletest.googlecode.com/files/gtest-1.7.0.zip", | |
sha256 = "247ca18dd83f53deb1328be17e4b1be31514cedfc1e3424f672bf11fd7e0d60d", | |
build_file = "gtest.BUILD", | |
) | |
bind( | |
name = "gtest/main", | |
actual = "@gtest-repo//:main", | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment