Skip to content

Align C++ validation messages, check order and reset() error locations with TS/C# #29

Open

Description

@Zanzavar

Follow-up from #24.

C++ validation errors differ from TS/C# in wording, check order and location (at 8a0c46c):

Input TS / C# C++
Enum with two members sharing a value "has duplicate or missing members" "has duplicate backing values" (Cpp/src/ArcscriptContext.h:63)
Enum named Board with no members, plus a Board scope "conflicts with a variable scope" "must have string or integer members" (type/members check at ArcscriptContext.h:46 runs first)
show(missingVar) "The variable missingVar does not exist" Unknown variable "missingVar"
reset(1) TS 1:0; C# null "Invalid arguments type", no location (0:0, Cpp/src/ArcscriptParserBase.cpp:176)
reset() TS 1:0; C# null "Wrong number of arguments", no location (0:0, ArcscriptParserBase.cpp:180)

Aligning the messages and check order, and adding an errorMessage/errorLocation check for these cases to the shared fixtures, would keep the runtimes from drifting.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions