summaryrefslogtreecommitdiff
path: root/tests/test_cases/deps/components/foo.cpp
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2024-07-25 16:22:46 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2024-07-25 16:22:46 +0200
commit1825c775dafd591e2a9e6bf12065e8c41727b96f (patch)
tree2e6aa43ba606ad2b086e5d73590bb56db4ee4bc9 /tests/test_cases/deps/components/foo.cpp
parente85a871e579ef77b6b226249d199a50d8a91f08f (diff)
downloadrules-cc-1825c775dafd591e2a9e6bf12065e8c41727b96f.tar.gz
Add a test for the use of the "components" field of a library
Diffstat (limited to 'tests/test_cases/deps/components/foo.cpp')
-rw-r--r--tests/test_cases/deps/components/foo.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_cases/deps/components/foo.cpp b/tests/test_cases/deps/components/foo.cpp
new file mode 100644
index 0000000..163c6e2
--- /dev/null
+++ b/tests/test_cases/deps/components/foo.cpp
@@ -0,0 +1,10 @@
+#include "foo.hpp"
+
+#include "foodep.hpp"
+#include <iostream>
+#include <ostream>
+
+int foo(int x) {
+ std::cout << "foo(" << x << ")" << std::endl;
+ return foodep(x) + 7;
+}