Update from Google.
--
MOE_MIGRATED_REVID=85702957
diff --git a/base_workspace/examples/cpp/BUILD b/base_workspace/examples/cpp/BUILD
new file mode 100644
index 0000000..195bbb3
--- /dev/null
+++ b/base_workspace/examples/cpp/BUILD
@@ -0,0 +1,25 @@
+package(default_visibility = ["//visibility:public"])
+
+cc_library(
+ name = "hello-lib",
+ srcs = ["hello-lib.cc"],
+ hdrs = ["hello-lib.h"],
+)
+
+cc_binary(
+ name = "hello-world",
+ srcs = ["hello-world.cc"],
+ deps = [":hello-lib"],
+)
+
+cc_test(
+ name = "hello-success_test",
+ srcs = ["hello-world.cc"],
+ deps = [":hello-lib"],
+)
+
+cc_test(
+ name = "hello-fail_test",
+ srcs = ["hello-fail.cc"],
+ deps = [":hello-lib"],
+)
diff --git a/base_workspace/examples/cpp/hello-fail.cc b/base_workspace/examples/cpp/hello-fail.cc
new file mode 100644
index 0000000..9b0b94a
--- /dev/null
+++ b/base_workspace/examples/cpp/hello-fail.cc
@@ -0,0 +1,11 @@
+#include "examples/cpp/hello-lib.h"
+
+int main(int argc, char** argv) {
+ const char* obj = "barf";
+ if (argc > 1) {
+ obj = argv[1];
+ }
+
+ greet(obj);
+ return 1;
+}
diff --git a/base_workspace/examples/cpp/hello-lib.cc b/base_workspace/examples/cpp/hello-lib.cc
new file mode 100644
index 0000000..aee43ba
--- /dev/null
+++ b/base_workspace/examples/cpp/hello-lib.cc
@@ -0,0 +1,5 @@
+#include "examples/cpp/hello-lib.h"
+
+#include <stdio.h>
+
+void greet(const char* obj) { printf("hello %s\n", obj); }
diff --git a/base_workspace/examples/cpp/hello-lib.h b/base_workspace/examples/cpp/hello-lib.h
new file mode 100644
index 0000000..3e74c2b
--- /dev/null
+++ b/base_workspace/examples/cpp/hello-lib.h
@@ -0,0 +1,6 @@
+#ifndef EXAMPLE_WORKSPACE_CPP_HELLO_LIB_H_
+#define EXAMPLE_WORKSPACE_CPP_HELLO_LIB_H_
+
+void greet(const char* object);
+
+#endif // EXAMPLE_WORKSPACE_CPP_HELLO_LIB_H_
diff --git a/base_workspace/examples/cpp/hello-world.cc b/base_workspace/examples/cpp/hello-world.cc
new file mode 100644
index 0000000..305b17f
--- /dev/null
+++ b/base_workspace/examples/cpp/hello-world.cc
@@ -0,0 +1,11 @@
+#include "examples/cpp/hello-lib.h"
+
+int main(int argc, char** argv) {
+ const char* obj = "world";
+ if (argc > 1) {
+ obj = argv[1];
+ }
+
+ greet(obj);
+ return 0;
+}