Add another test file from #43

This commit is contained in:
Ben Jackson 2019-07-24 21:17:58 +01:00
commit 44b8100078
3 changed files with 20 additions and 4 deletions

View file

@ -1 +1,2 @@
simple
variables

View file

@ -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)

11
tests/testdata/cpp/simple/variables.cpp vendored Normal file
View file

@ -0,0 +1,11 @@
#include <iostream>
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;
}