message: Recognize some spec test expected errors by their message prefix instead of the full message
diff: @@ -179,6 +179,12 @@ static Action* parseAction(ParseState& state)
  return result;
  }
  +template<Uptr numPrefixChars>
  +static bool stringStartsWith(const char* string,const char (&prefix)[numPrefixChars])
  +{
  + return !strncmp(string,prefix,numPrefixChars - 1);
  +}
  +
  static Command* parseCommand(ParseState& state)
  {
  Command* result = nullptr;
  @@ -250,14 +256,10 @@ static Command* parseCommand(ParseState& state)
  else if(!strcmp(expectedErrorMessage.c_str(),"integer overflow")) { expectedCause = Runtime::Exception::Cause::integerDivideByZeroOrIntegerOverflow; }
  else if(!strcmp(expectedErrorMessage.c_str(),"integer divide by zero")) { expectedCause = Runtime::Exception::Cause::integerDivideByZeroOrIntegerOverflow; }
  else if(!strcmp(expectedErrorMessage.c_str(),"invalid conversion to integer")) { expectedCause = Runtime::Exception::Cause::invalidFloatOperation; }
  - else if(!strcmp(expectedErrorMessage.c_str(),"unreachable executed")) { expectedCause = Runtime::Exception::Cause::reachedUnreachable; }
  - else if(!strcmp(expectedErrorMessage.c_str(),"unreachable")) { expectedCause = Runtime::Exception::Cause::reachedUnreachable; }
  - else if(!strcmp(expectedErrorMessage.c_str(),"indirect call signature mismatch")) { expectedCause = Runtime::Exception::Cause::indirectCallSignatureMismatch; }
  - else if(!strcmp(expectedErrorMessage.c_str(),"indirect call")) { expectedCause = Runtime::Exception::Cause::indirectCallSignatureMismatch; }
  - else if(!strcmp(expectedErrorMessage.c_str(),"undefined element")) { expectedCause = Runtime::Exception::Cause::undefinedTableElement; }
  - else if(!strcmp(expectedErrorMessage.c_str(),"undefined")) { expectedCause = Runtime::Exception::Cause::undefinedTableElement; }
  - else if(!strcmp(expectedErrorMessage.c_str(),"uninitialized")) { expectedCause = Runtime::Exception::Cause::undefinedTableElement; }
  - else if(!strcmp(expectedErrorMessage.c_str(),"uninitialized element")) { expectedCause = Runtime::Exception::Cause::undefinedTableElement; }
  + else if(stringStartsWith(expectedErrorMessage.c_str(),"unreachable")) { expectedCause = Runtime::Exception::Cause::reachedUnreachable; }
  + else if(stringStartsWith(expectedErrorMessage.c_str(),"indirect call")) { expectedCause = Runtime::Exception::Cause::indirectCallSignatureMismatch; }
  + else if(stringStartsWith(expectedErrorMessage.c_str(),"undefined")) { expectedCause = Runtime::Exception::Cause::undefinedTableElement; }
  + else if(stringStartsWith(expectedErrorMessage.c_str(),"uninitialized")) { expectedCause = Runtime::Exception::Cause::undefinedTableElement; }
  result = new AssertTrapCommand(std::move(locus),action,expectedCause);
  break;
  