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

MoveNextAfterUpdate Test Seems to be Testing the Wrong Method #46

Open
lundmikkel opened this issue Mar 22, 2016 · 1 comment
Open

MoveNextAfterUpdate Test Seems to be Testing the Wrong Method #46

lundmikkel opened this issue Mar 22, 2016 · 1 comment
Labels
bug Something isn't working tests Concerning C5.Tests

Comments

@lundmikkel
Copy link
Contributor

The MoveNextAfterUpdate() test in ArrayListTest seems to contain a mistake causing it to test the wrong thing:

[Test]
public void MoveNextAfterUpdate()
{
    list.Add(5);
    list.Add(8);
    list.Add(5);

    SCG.IEnumerator<int> e = list.GetEnumerator();

    e.MoveNext();
    list.Add(99); // <-- Bug: this should be Update()
    Assert.Throws<CollectionModifiedException>(() => e.MoveNext());
}

The test checks if calling Add() makes the enumerator fail. It should probably be a call to Update() instead.

I'm not sure if this mistake has been duplicated elsewhere.

@ondfisk
Copy link
Collaborator

ondfisk commented Apr 13, 2016

You're probably right.
Perhaps you could make a pull request fixing these (there are a couple)
Thanks

@JnxF JnxF added bug Something isn't working tests Concerning C5.Tests labels Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tests Concerning C5.Tests
Projects
None yet
Development

No branches or pull requests

3 participants