Skip to content

Conversation

@BFergerson
Copy link
Collaborator

No description provided.

@BFergerson
Copy link
Collaborator Author

@MrMineO5, modeled the new tests after the design of SimplePrimitivesLiveInstrumentTest.

I had some trouble implementing it with OOP so ended up using a utility class.
Any thoughts on how to improve the design?

@MrMineO5
Copy link
Contributor

MrMineO5 commented Aug 7, 2022

Why are you returning a function that returns the file name in TestUtils.getFilename?
Also, wouldn't that regular expression break with spaces in the file path?

@BFergerson
Copy link
Collaborator Author

Something I copied from the JVM implementation. I wanted the source and line numbers of the live instruments to be dynamic so you can move the files around and modify them without breaking them. Adding TestUtils.getFilename should allow you to rename that file and the test will still pass.

@BFergerson
Copy link
Collaborator Author

@MrMineO5, thanks for the improvments. I like how these tests are coming out. Looks very easy to maintain.

@BFergerson BFergerson marked this pull request as ready for review August 7, 2022 18:19
@BFergerson BFergerson merged commit c747374 into master Aug 7, 2022
@BFergerson BFergerson deleted the self-test-design branch August 7, 2022 18:21
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