From 1900720353bd76fa972423f413a206d0a7a42d69 Mon Sep 17 00:00:00 2001 From: Pierrick Bouvier Date: Fri, 28 Aug 2020 00:23:11 +0200 Subject: D: fix include order Commit 93c3ec7e introduced a new way to handle deduplication with compiler args. This resulted in D includes to be reversed. --- run_unittests.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'run_unittests.py') 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()) -- cgit v1.1