void () { String source = """ class A { void f(int i) { assert i > 0; assert i < 10 : "i: " + i; assert i == 5; } }"""; assertEquals("find assert statements", 3, findMatchesCount(source, "assert '_a;")); assertEquals("find assert statements 2", 3, findMatchesCount(source, "assert '_a : '_b?;")); assertEquals("find assert statement with messages", 1, findMatchesCount(source, "assert '_a : '_b;")); assertEquals("find assert statement without messages", 2, findMatchesCount(source, "assert 'a : '_b{0,0};")); }