Skip to content

Adds tests setting values on a TMap with a non existent key#5

Open
RenatoVog wants to merge 4 commits into
developmentfrom
TMapAccess
Open

Adds tests setting values on a TMap with a non existent key#5
RenatoVog wants to merge 4 commits into
developmentfrom
TMapAccess

Conversation

@RenatoVog

Copy link
Copy Markdown

No description provided.

Comment thread Haxe/Scripts/cases/TestTArray.hx Outdated
Comment thread Haxe/Scripts/cases/TestTArray.hx Outdated
s["Test3"].toString().should.be("43");
[ for (key in s.GenerateKeyArray()) key.toString() ].should.containExactly(["Test3"]);
s.Remove("Test3");
s.Contains("Test3").should.be(false);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also test s["SomeOtherValue"].toString().should.be("") and then s.Remove("SomeOtherValue")? Right now the getter will add if it doesn't exist, but I think that's a better option than just failing at runtime

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants