diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2019-12-04 12:31:18 -0500 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-12-10 18:02:41 +0200 |
commit | 552e78da4d1837699cc706e59078046ce4a1a2a5 (patch) | |
tree | 150aac4c6aa9d601a1b357b8a9e15d3b815967df /run_unittests.py | |
parent | 9c72d0fdb287f1838c68915e469b6db455f59a7e (diff) | |
download | meson-552e78da4d1837699cc706e59078046ce4a1a2a5.zip meson-552e78da4d1837699cc706e59078046ce4a1a2a5.tar.gz meson-552e78da4d1837699cc706e59078046ce4a1a2a5.tar.bz2 |
assert(): Make message argument optional
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py index ec270d7..b0ee48f 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -4417,6 +4417,12 @@ class FailureTests(BasePlatformTests): match = 'Meson version is.*but project requires >=2000' self.assertMesonRaises("", match, meson_version='>=2000', options=options) + def test_assert_default_message(self): + self.assertMesonRaises("k1 = 'a'\n" + + "assert({\n" + + " k1: 1,\n" + + "}['a'] == 2)\n", + r"Assert failed: {k1 : 1}\['a'\] == 2") @unittest.skipUnless(is_windows() or is_cygwin(), "requires Windows (or Windows via Cygwin)") class WindowsTests(BasePlatformTests): |