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

Curly braces not shown in JMockit coverage if "if" has two conditions with "&&" operator #65

Closed
Varun200864 opened this issue Sep 15, 2014 · 0 comments
Assignees
Labels
bug

Comments

@Varun200864
Copy link

@Varun200864 Varun200864 commented Sep 15, 2014

Hi,

Curly braces not shown in JMockit coverage if "if" has two conditions with "&&" operator
Environment -
Win7 32 bit
JMockit 1.11
JMockit coverage version 1.11

package com.JMockitMoreFeaturesVersion1_11MavenProjevt.curlyBracesNotShownInCoveragePackage;
public class ClassToCheck
{
public void curlyBracesNotShownInCoverage()
{
boolean someCondition = true;
if(someCondition == true && someCondition!= false){

    }
}

}

package com.JMockitMoreFeaturesVersion1_11MavenProjevt.curlyBracesNotShownInCoveragePackage;

import org.junit.Before;
import org.junit.Test;

public class TestAClassCurlyBracesNotShownInCoverage
{
ClassToCheck classToTest;
@before
public void setUp()
{
classToTest = new ClassToCheck();
}
@test
public void testCurlyBracesNotShowninCoverageTestMethod()
{
classToTest.curlyBracesNotShownInCoverage();
}
}

JMockitMoreFeaturesArtifact\src\main\java\com\JMockitMoreFeaturesVersion1_11MavenProjevt\curlyBracesNotShownInCoveragePackage\ClassToCheck.java 1 package com.JMockitMoreFeaturesVersion1_11MavenProjevt.curlyBracesNotShownInCoveragePackage;
2 1 public class ClassToCheck
3 {
4 public void curlyBracesNotShownInCoverage()
5 {
6 1 boolean someCondition = true;
7 1 if(someCondition == true && someCondition!= false)

9 }
10 1 }
11 }

@rliesenfeld rliesenfeld self-assigned this Sep 15, 2014
@rliesenfeld rliesenfeld added the bug label Sep 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.