Teach unit test test_compiler_detection about clang-cl

v2:
Update for ClangClCcompiler class
v3:
Reorder compilers to simplify
This commit is contained in:
Jon Turney 2018-10-02 13:24:12 +01:00
parent e820c66a4c
commit 152ea1a91a
No known key found for this signature in database
GPG Key ID: C7C86F0370285C81
1 changed files with 4 additions and 0 deletions

View File

@ -1598,6 +1598,7 @@ class AllPlatformTests(BasePlatformTests):
clang = mesonbuild.compilers.ClangCompiler
intel = mesonbuild.compilers.IntelCompiler
msvc = mesonbuild.compilers.VisualStudioCCompiler
clangcl = mesonbuild.compilers.ClangClCCompiler
ar = mesonbuild.linkers.ArLinker
lib = mesonbuild.linkers.VisualStudioLinker
langs = [('c', 'CC'), ('cpp', 'CXX')]
@ -1619,6 +1620,9 @@ class AllPlatformTests(BasePlatformTests):
if ebase.startswith('g') or ebase.endswith(('-gcc', '-g++')):
self.assertIsInstance(ecc, gnu)
self.assertIsInstance(elinker, ar)
elif 'clang-cl' in ebase:
self.assertIsInstance(ecc, clangcl)
self.assertIsInstance(elinker, lib)
elif 'clang' in ebase:
self.assertIsInstance(ecc, clang)
self.assertIsInstance(elinker, ar)