Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Copy tests ensuring failures if there's not a deep copy #1304

Open
hahn-kev opened this issue Dec 4, 2024 · 0 comments
Open

Improve Copy tests ensuring failures if there's not a deep copy #1304

hahn-kev opened this issue Dec 4, 2024 · 0 comments
Assignees
Labels
📖 MiniLcm issues related to miniLcm library code, includes fwdat bridge and lcmCrdt

Comments

@hahn-kev
Copy link
Collaborator

hahn-kev commented Dec 4, 2024

Right now we have some tests for the copy method, however if the copy method does not make a deep copy of a Multistring the test will not fail. We can fix our tests to catch that case with the example seen here
fluentassertions/fluentassertions#2315 (comment)

For example this should fail

new Entry() {
LexemeForm = this.LexemeForm
}

because a copy of lexeme form was not made. This should pass

new Entry() {
LexemeForm = this.LexemeForm.Copy()
}

Since this is custom testing code there should be a test which asserts that the failure case throws

@hahn-kev hahn-kev assigned hahn-kev and rmunn and unassigned hahn-kev Dec 9, 2024
@hahn-kev hahn-kev added the 📖 MiniLcm issues related to miniLcm library code, includes fwdat bridge and lcmCrdt label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📖 MiniLcm issues related to miniLcm library code, includes fwdat bridge and lcmCrdt
Projects
None yet
Development

No branches or pull requests

2 participants