From 44b8100078b0fabcac1e7dcedcc463d1ea8db80b Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Wed, 24 Jul 2019 21:17:58 +0100 Subject: [PATCH] Add another test file from #43 --- tests/testdata/cpp/simple/.gitignore | 1 + tests/testdata/cpp/simple/Makefile | 12 ++++++++---- tests/testdata/cpp/simple/variables.cpp | 11 +++++++++++ 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 tests/testdata/cpp/simple/variables.cpp diff --git a/tests/testdata/cpp/simple/.gitignore b/tests/testdata/cpp/simple/.gitignore index ab23474..ac54bdc 100644 --- a/tests/testdata/cpp/simple/.gitignore +++ b/tests/testdata/cpp/simple/.gitignore @@ -1 +1,2 @@ simple +variables diff --git a/tests/testdata/cpp/simple/Makefile b/tests/testdata/cpp/simple/Makefile index c554c2b..8583202 100644 --- a/tests/testdata/cpp/simple/Makefile +++ b/tests/testdata/cpp/simple/Makefile @@ -1,7 +1,11 @@ -CXXFLAGS=-g -O0 +CXXFLAGS=-g -O0 -std=c++17 -simple: simple.cpp +.PHONY: all + +TARGETS=simple variables + +all: $(TARGETS) clean: - rm -f simple - rm -rf simple.dSYM + rm -f $(TARGETS) + rm -rf $(TARGETS:%=%.dSYM) diff --git a/tests/testdata/cpp/simple/variables.cpp b/tests/testdata/cpp/simple/variables.cpp new file mode 100644 index 0000000..d0067d3 --- /dev/null +++ b/tests/testdata/cpp/simple/variables.cpp @@ -0,0 +1,11 @@ +#include + +int main() { + std::cout << "Hello world!" << std::endl; + int a = 1; + ++a; + int& b = a; + ++a; + std::cout << "a: " << a << " b: " << b << std::endl; + return 0; +}