Skip to content

Add stock AssertStrEq to testing include#1185

Merged
KyleSanderson merged 2 commits intoalliedmodders:masterfrom
nosoop:test-string
Jul 9, 2020
Merged

Add stock AssertStrEq to testing include#1185
KyleSanderson merged 2 commits intoalliedmodders:masterfrom
nosoop:test-string

Conversation

@nosoop
Copy link
Contributor

@nosoop nosoop commented Feb 21, 2020

Adds a new stock function AssertStrEq to assert equality between two strings.

It's a minor convenience over AssertTrue since it prints the expected string without having to include it in the text argument.

Copy link
Member

@KyleSanderson KyleSanderson left a comment

Choose a reason for hiding this comment

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

This is meant for testing - not production. For completeness/lineage can you please mention how this came to be and why it's important for your project.

@nosoop
Copy link
Contributor Author

nosoop commented Feb 27, 2020

Sure; this came out of a desire to ensure strings were correct in the test suite for the TF2 Econ Data compatibility shim, which checks to see that both the compatibility shim and the original TF2ItemsInfo natives function similarly.

I'd also like to make use of it in tests for the double extension if this gets accepted.

Copy link
Member

@Headline Headline left a comment

Choose a reason for hiding this comment

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

I think this is harmless and can be pulled in for others to use, that way there's no Frankenstein-ing of testing stuffs.

@KyleSanderson thoughts?

@KyleSanderson KyleSanderson self-requested a review July 9, 2020 02:17
@KyleSanderson KyleSanderson merged commit 69ae224 into alliedmodders:master Jul 9, 2020
@KyleSanderson
Copy link
Member

Yeah, you were right @Headline - thanks for bringing that up. thanks @nosoop for the contribution.

@nosoop nosoop deleted the test-string branch July 9, 2020 02:19
fengjixuchui added a commit to fengjixuchui/sourcemod that referenced this pull request Jul 9, 2020
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