summaryrefslogtreecommitdiff
path: root/test/tools_test.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2023-01-17 13:35:05 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2023-01-17 13:35:26 +0100
commit79c11f3dbaad391633c2678e85eeaba267df5ee1 (patch)
tree6993397fc0c68fdc41bfb9b9c621fde9a3a56b14 /test/tools_test.cc
parentc11bbf8455b065c22c7a2147b33fb6a9c8c43e11 (diff)
Recognize gcc and clang (not just their c++ variants) in tool-chain detection.
Diffstat (limited to 'test/tools_test.cc')
-rw-r--r--test/tools_test.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/tools_test.cc b/test/tools_test.cc
index 7127b8d..a428ea1 100644
--- a/test/tools_test.cc
+++ b/test/tools_test.cc
@@ -172,9 +172,24 @@ public:
void getToolChain_test()
{
+ //
+ // gcc
+ //
+ uASSERT_EQUAL(ctor::toolchain::gcc, getToolChain("/usr/bin/gcc"));
+ uASSERT_EQUAL(ctor::toolchain::gcc, getToolChain("/usr/bin/gcc-10"));
+ uASSERT_EQUAL(ctor::toolchain::gcc, getToolChain("/usr/bin/x86_64-pc-linux-gnu-g++-9.3.0"));
+
uASSERT_EQUAL(ctor::toolchain::gcc, getToolChain("/usr/bin/g++"));
uASSERT_EQUAL(ctor::toolchain::gcc, getToolChain("/usr/bin/g++-10"));
uASSERT_EQUAL(ctor::toolchain::gcc, getToolChain("/usr/bin/x86_64-pc-linux-gnu-g++-9.3.0"));
+
+ //
+ // clang
+ //
+ uASSERT_EQUAL(ctor::toolchain::clang, getToolChain("/usr/bin/clang"));
+ uASSERT_EQUAL(ctor::toolchain::clang, getToolChain("/usr/bin/clang-16"));
+ uASSERT_EQUAL(ctor::toolchain::clang, getToolChain("/usr/lib/llvm/16/bin/i686-pc-linux-gnu-clang-16"));
+
uASSERT_EQUAL(ctor::toolchain::clang, getToolChain("/usr/bin/clang++"));
uASSERT_EQUAL(ctor::toolchain::clang, getToolChain("/usr/bin/clang++-16"));
uASSERT_EQUAL(ctor::toolchain::clang, getToolChain("/usr/lib/llvm/16/bin/i686-pc-linux-gnu-clang++-16"));