Skip to content

Instantly share code, notes, and snippets.

@mikedanese
Last active Aug 29, 2015
Embed
What would you like to do?
cc_test(
name = "my_test",
srcs = ["my_test.cc"],
deps = ["//external:gtest/main"],
)
cc_library(
name = "main",
srcs = glob(
["src/*.cc"],
exclude = ["src/gtest-all.cc"]
),
hdrs = glob(["include/**/*.h"]),
includes = [
".",
"include"
],
linkopts = ["-pthread"],
visibility = ["//visibility:public"],
)
#include "gtest/gtest.h"
TEST(FactorialTest, Negative) {
EXPECT_EQ(1, 1);
}
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