aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts/python_unittests.py
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2017-09-07 00:18:07 +0200
committerSimon Warta <[email protected]>2017-09-07 00:20:46 +0200
commit3a7872d17bfc0801de94812d718d0a5311fd7cdf (patch)
tree84273ed48643b03ee08eaf63293a50aaa8d7e618 /src/scripts/python_unittests.py
parent9493d6761caec45ae25d15c73130376cd73939a9 (diff)
Add appleclang compiler version tests
Diffstat (limited to 'src/scripts/python_unittests.py')
-rwxr-xr-xsrc/scripts/python_unittests.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/scripts/python_unittests.py b/src/scripts/python_unittests.py
index fff32e03f..1df35f0cd 100755
--- a/src/scripts/python_unittests.py
+++ b/src/scripts/python_unittests.py
@@ -96,6 +96,20 @@ Candidate multilib: .;@m32
Selected multilib: .;@m32"""
self.assertEqual(detector.version_from_compiler_output(compiler_out), "3.7")
+ def test_clang_version_appleclang(self):
+ detector = CompilerDetector("clang", "clang++", "darwin")
+ compiler_out = """Apple LLVM version 8.1.0 (clang-802.0.42)
+Target: x86_64-apple-darwin16.7.0
+Thread model: posix
+InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin"""
+ self.assertEqual(detector.version_from_compiler_output(compiler_out), "3.9")
+
+ compiler_out = """Apple LLVM version 9.0.0 (clang-900.0.35)
+Target: x86_64-apple-darwin16.7.0
+Thread model: posix
+InstalledDir: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin"""
+ self.assertEqual(detector.version_from_compiler_output(compiler_out), "4.0")
+
def test_msvc_version(self):
detector = CompilerDetector("msvc", "cl.exe", "windows")
compiler_out = """msvc_version.c