test: improve test-assert
Add RegExp to check assert throws the expected AssertionErrors.
For the one with multiple flags is ok to hardcode the flags since the
spec indicates the ordering will always be gim
, here is the link:
http://www.ecma-international.org/ecma-262/6.0/#sec-get-regexp.prototype.flags
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines