Index: tests/methods.test =================================================================== diff -u -r764ac30a3ca9712d9fc59853b36759e1dd146114 -r4b9ddd1b06ce34fd352791fcae53ad91a79b43ce --- tests/methods.test (.../methods.test) (revision 764ac30a3ca9712d9fc59853b36759e1dd146114) +++ tests/methods.test (.../methods.test) (revision 4b9ddd1b06ce34fd352791fcae53ad91a79b43ce) @@ -1090,17 +1090,29 @@ :public method foo {} { :configure -xxx 1 } + :public method bar {} { + :configure -xxx 1 + } -postcondition {{1 == 0}} :create e1 } # base case ? {catch {e1 foo} errMsg} 1 ? {string match "invalid non-positional*" $errMsg} 1 + ? {catch {e1 bar} errMsg} 1 + ? {string match "invalid non-positional*" $errMsg} 1 + + # turn on assertion checking nsf::method::assertion e1 check all - # still report error + # still report error when invariant would not return error ? {catch {e1 foo} errMsg} 1 ? {string match "invalid non-positional*" $errMsg} 1 + + # still report error when postcondition would not return error + ? {catch {e1 bar} errMsg} 1 + ? {string match "invalid non-positional*" $errMsg} 1 + }