From d54dca73b407ec034cb6dc4706f4cc479bbb620a Mon Sep 17 00:00:00 2001 From: Brendan Hansknecht Date: Thu, 19 Aug 2021 22:59:40 -0700 Subject: [PATCH] Change test app to C++ for better check on naming --- linker/tests/Makefile | 10 +++++----- linker/tests/app.c | 3 --- linker/tests/app.cc | 3 +++ linker/tests/platform.c | 9 --------- linker/tests/platform.cc | 9 +++++++++ 5 files changed, 17 insertions(+), 17 deletions(-) delete mode 100644 linker/tests/app.c create mode 100644 linker/tests/app.cc delete mode 100644 linker/tests/platform.c create mode 100644 linker/tests/platform.cc diff --git a/linker/tests/Makefile b/linker/tests/Makefile index 8b153ed8df..f3f8beb5d4 100644 --- a/linker/tests/Makefile +++ b/linker/tests/Makefile @@ -1,10 +1,10 @@ all: platform -platform: platform.c libapp.so - $(CC) -O2 -fPIC -fPIE -o $@ $^ +platform: platform.cc libapp.so + $(CXX) -O2 -fPIC -fPIE -o $@ $^ -libapp.so: app.c - $(CC) -O2 -fPIC -shared -o $@ $^ +libapp.so: app.cc + $(CXX) -O2 -fPIC -shared -o $@ $^ clean: - rm -f platform libapp.so \ No newline at end of file + rm -f platform libapp.so diff --git a/linker/tests/app.c b/linker/tests/app.c deleted file mode 100644 index 1d3311dd93..0000000000 --- a/linker/tests/app.c +++ /dev/null @@ -1,3 +0,0 @@ -#include - -void app() { printf("Hello World from the application"); } diff --git a/linker/tests/app.cc b/linker/tests/app.cc new file mode 100644 index 0000000000..6626169c95 --- /dev/null +++ b/linker/tests/app.cc @@ -0,0 +1,3 @@ +#include + +void app() { std::cout << "Hello World from the application" << std::endl; } diff --git a/linker/tests/platform.c b/linker/tests/platform.c deleted file mode 100644 index 41d36b1bcb..0000000000 --- a/linker/tests/platform.c +++ /dev/null @@ -1,9 +0,0 @@ -#include - -void app(); - -int main() { - printf("Hello World from the platform"); - app(); - return 0; -} diff --git a/linker/tests/platform.cc b/linker/tests/platform.cc new file mode 100644 index 0000000000..34581c7432 --- /dev/null +++ b/linker/tests/platform.cc @@ -0,0 +1,9 @@ +#include + +void app(); + +int main() { + std::cout << "Hello World from the platform\n"; + app(); + return 0; +}