diff options
author | Mathieu Duponchelle <mathieu@centricular.com> | 2018-05-20 22:02:08 +0200 |
---|---|---|
committer | Mathieu Duponchelle <mathieu@centricular.com> | 2018-05-20 22:36:18 +0200 |
commit | 195c356f918d9d617ec8705cd459732ff1418650 (patch) | |
tree | 39beac8758a64cfd2d5d5f4b69a9e52abba8fba2 /run_unittests.py | |
parent | bd519fc75ed364f3f1082081ed39b1314d0da990 (diff) | |
download | meson-195c356f918d9d617ec8705cd459732ff1418650.zip meson-195c356f918d9d617ec8705cd459732ff1418650.tar.gz meson-195c356f918d9d617ec8705cd459732ff1418650.tar.bz2 |
dict: address review comments
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py index 3608d3e..162bfcf 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -582,6 +582,7 @@ class BasePlatformTests(unittest.TestCase): if inprocess: try: (returncode, out, err) = run_configure(self.meson_mainfile, self.meson_args + args + extra_args) + print (out) if 'MESON_SKIP_TEST' in out: raise unittest.SkipTest('Project requested skipping.') if returncode != 0: @@ -2328,6 +2329,16 @@ class FailureTests(BasePlatformTests): self.assertEqual(cm.exception.returncode, 2) self.wipe() + def test_dict_requires_key_value_pairs(self): + self.assertMesonRaises("dict = {3, 'foo': 'bar'}", + 'Only key:value pairs are valid in dict construction.') + self.assertMesonRaises("{'foo': 'bar', 3}", + 'Only key:value pairs are valid in dict construction.') + + def test_dict_forbids_duplicate_keys(self): + self.assertMesonRaises("dict = {'a': 41, 'a': 42}", + 'Duplicate dictionary key: a.*') + class WindowsTests(BasePlatformTests): ''' |