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

Warning stops test execution #43

Closed
helmbold opened this issue Jun 24, 2016 · 7 comments
Closed

Warning stops test execution #43

helmbold opened this issue Jun 24, 2016 · 7 comments
Labels
bug 🐛 Issues that report a problem or error in the code.
Milestone

Comments

@helmbold
Copy link
Contributor

helmbold commented Jun 24, 2016

If I run all tests of the KotlinTest project, the execution (in IntelliJ 2016.1.3) stops with 109 of 110 tests. It appears the message:

[WARN] When comparing doubles consider using tolerance, eg: a shouldBe b plusOrMinus c

error in IntelliJ

@helmbold helmbold added the bug 🐛 Issues that report a problem or error in the code. label Jun 24, 2016
@helmbold helmbold added this to the 1.3 milestone Jun 24, 2016
@sksamuel
Copy link
Member

I don't think the warn is anything to do with that, because that's just being emitted when I test plusOrMinus in DoubleMatchersTest. I get something similar, but all tests pass. I think perhaps the count is just off.

@sksamuel
Copy link
Member

Ah the issue is just that there is an ignored test in ConfigTest. It's there just to make sure the dsl doesn't change and for a visible check. I'm not sure how to check that an ignored test didn't actually run.

@helmbold
Copy link
Contributor Author

How does JUnit gets the number of tests? Maybe ignored tests can be subtracted there.

@sksamuel
Copy link
Member

That's certainly easy enough to do, but then it doesn't appear in the list.
What do you think is better.

On 28 June 2016 at 10:59, Christian Helmbold notifications@github.com
wrote:

How does JUnit gets the number of tests? Maybe ignored tests can be
subtracted there.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#43 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAtZGmR076iRLPOm2yRB-FvSzKrCZOOKks5qQPCTgaJpZM4I-ETJ
.

@helmbold
Copy link
Contributor Author

It is good to see (and count) ignored tests.However there is some difference between ignored JUnit tests and ignored KotlinTest tests.

JUnit counts all tests and ignored tests:
test count in JUnit

KotlinTest doesn't count ignored tests:
test count with KotlinTest

I have no idea how to do it, but I'd prefer the JUnit behavior and view.

@sksamuel
Copy link
Member

Agreed. I'll figure it out while you're doing the config stuff.

On 28 June 2016 at 11:40, Christian Helmbold notifications@github.com
wrote:

It is good to see (and count) ignored tests.However there is some
difference between ignored JUnit tests and ignored KotlinTest tests.

JUnit counts all tests and ignored tests:
[image: test count in JUnit]
https://camo.githubusercontent.com/0d7cee037b162a624cf0b2138529ce471d1ce36e/687474703a2f2f692e696d6775722e636f6d2f30596f59716b372e706e67

KotlinTest doesn't count ignored tests:
[image: test count with KotlinTest]
https://camo.githubusercontent.com/750846fc38b6d436f0ec97cad81034caa56bbde7/687474703a2f2f692e696d6775722e636f6d2f4b303775526a672e706e67

I have no idea how to do it, but I'd prefer the JUnit behavior and view.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#43 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAtZGlQl0TudSLHP9MYq6voAkW-x2PgCks5qQPoagaJpZM4I-ETJ
.

@sksamuel
Copy link
Member

Sorted

sksamuel added a commit that referenced this issue Jun 28, 2016
sksamuel added a commit that referenced this issue Jul 3, 2016
LeoColman pushed a commit that referenced this issue Mar 5, 2024
fix the following bug - the test below was passing:
```
 "fail to detect count mismatch" {
            sequenceOf("apple", "apple", "orange") should containAllInAnyOrder(
                sequenceOf("apple", "orange", "orange")
            )
        }
```
* also fix two tests named "for subset, same count with nulls" - they
were not validating correct behavior.
* also provide more details about what exactly did not match, such as:
```
Sequence should contain the values of [1, 1, 2] in any order, but was [1, 2, 2].
Count Mismatches: 
  For 1: expected count: <2>, but was: <1>
  For 2: expected count: <1>, but was: <2>
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Issues that report a problem or error in the code.
Projects
None yet
Development

No branches or pull requests

2 participants