aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorPierrick Bouvier <pierrick.bouvier@posteo.net>2020-08-28 00:23:11 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2020-08-30 18:56:24 +0300
commit1900720353bd76fa972423f413a206d0a7a42d69 (patch)
tree9275994dcc94fdd2a08f357ab79b17178c93687d /run_unittests.py
parent6fc067344d035c0c16fb33c11f5f0ace5c99c558 (diff)
downloadmeson-1900720353bd76fa972423f413a206d0a7a42d69.zip
meson-1900720353bd76fa972423f413a206d0a7a42d69.tar.gz
meson-1900720353bd76fa972423f413a206d0a7a42d69.tar.bz2
D: fix include order
Commit 93c3ec7e introduced a new way to handle deduplication with compiler args. This resulted in D includes to be reversed.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 9cd95f0..0ff8035 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -376,6 +376,12 @@ class InternalTests(unittest.TestCase):
a += ['-I.', '-I./tests2/']
self.assertEqual(a, ['-I.', '-I./tests2/', '-I./tests/', '-I..'])
+ def test_compiler_args_class_d(self):
+ d = mesonbuild.compilers.DCompiler([], 'fake', MachineChoice.HOST, 'info', 'arch', False, None)
+ # check include order is kept when deduplicating
+ a = d.compiler_args(['-Ifirst', '-Isecond', '-Ithird'])
+ a += ['-Ifirst']
+ self.assertEqual(a, ['-Ifirst', '-Isecond', '-Ithird'])
def test_compiler_args_class(self):
cc = mesonbuild.compilers.CCompiler([], 'fake', False, MachineChoice.HOST, mock.Mock())