-
Notifications
You must be signed in to change notification settings - Fork 2
Cov 203 #9
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
base: main
Are you sure you want to change the base?
Cov 203 #9
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,9 +13,9 @@ public Math(int magicNumber) { | |
| */ | ||
| public int magicAdd(int x, int y) { | ||
| if (y == magicNumber) { | ||
| System.out.println("hey2"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: File contains tab characters (this is the first instance). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: File contains tab characters (this is the first instance). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: File contains tab characters (this is the first instance). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: File contains tab characters (this is the first instance). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: File contains tab characters (this is the first instance). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: File contains tab characters (this is the first instance). |
||
| return y - x; | ||
| } else { | ||
| System.out.println("hey"); | ||
| return x + y; | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| package com.codacy.utils; | ||
|
|
||
| public class NoCoverage { | ||
|
|
||
| private int magicNumber; | ||
|
|
||
| public NoCoverage(int magicNumber) { | ||
| this.magicNumber = magicNumber; | ||
| } | ||
|
|
||
| /** | ||
| * Adds 2 numbers, unless there is a magic number on the second argument | ||
| */ | ||
| public int magicAdd(int x, int y) { | ||
| if (y == magicNumber) { | ||
| System.out.println("hey2"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: File contains tab characters (this is the first instance). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: File contains tab characters (this is the first instance). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: File contains tab characters (this is the first instance). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: File contains tab characters (this is the first instance). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: File contains tab characters (this is the first instance). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: File contains tab characters (this is the first instance). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: File contains tab characters (this is the first instance). |
||
| return y - x; | ||
| } else { | ||
| return x + y; | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| package com.codacy.utils; | ||
|
|
||
| public class aMath { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: The class name 'aMath' doesn't match '[A-Z][a-zA-Z0-9]*' There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: The class name 'aMath' doesn't match '[A-Z][a-zA-Z0-9]*' There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: The class name 'aMath' doesn't match '[A-Z][a-zA-Z0-9]*' There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: The class name 'aMath' doesn't match '[A-Z][a-zA-Z0-9]*' There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: The class name 'aMath' doesn't match '[A-Z][a-zA-Z0-9]*' There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: The class name 'aMath' doesn't match '[A-Z][a-zA-Z0-9]*' There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: The class name 'aMath' doesn't match '[A-Z][a-zA-Z0-9]*' |
||
|
|
||
| private int magicNumber; | ||
|
|
||
| public aMath(int magicNumber) { | ||
| this.magicNumber = magicNumber; | ||
| } | ||
|
|
||
| /** | ||
| * Adds 2 numbers, unless there is a magic number on the second argument | ||
| */ | ||
| public int magicAdd(int x, int y) { | ||
| if (y == magicNumber) { | ||
| System.out.println("hey2"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: File contains tab characters (this is the first instance). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: File contains tab characters (this is the first instance). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: File contains tab characters (this is the first instance). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: File contains tab characters (this is the first instance). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: File contains tab characters (this is the first instance). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: File contains tab characters (this is the first instance). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: File contains tab characters (this is the first instance). |
||
| return y - x; | ||
| } else { | ||
| return x + y; | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| package com.codacy.utils; | ||
|
|
||
| import org.junit.Test; | ||
|
|
||
| import static org.junit.Assert.assertEquals; | ||
|
|
||
| public class aMathTest { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: The class name 'aMathTest' doesn't match '^Test.*$|^[A-Z][a-zA-Z0-9]*Test(s|Case)?$' There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: The class name 'aMathTest' doesn't match '^Test.*$|^[A-Z][a-zA-Z0-9]*Test(s|Case)?$' There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: The class name 'aMathTest' doesn't match '^Test.*$|^[A-Z][a-zA-Z0-9]*Test(s|Case)?$' There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: The class name 'aMathTest' doesn't match '^Test.*$|^[A-Z][a-zA-Z0-9]*Test(s|Case)?$' There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: The class name 'aMathTest' doesn't match '^Test.*$|^[A-Z][a-zA-Z0-9]*Test(s|Case)?$' There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: The class name 'aMathTest' doesn't match '^Test.*$|^[A-Z][a-zA-Z0-9]*Test(s|Case)?$' There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: The class name 'aMathTest' doesn't match '^Test.*$|^[A-Z][a-zA-Z0-9]*Test(s|Case)?$' |
||
| @Test | ||
| public void shouldAddNumbers() { | ||
| aMath math = new aMath(23); | ||
|
|
||
| assertEquals(7, math.magicAdd(3, 4)); | ||
| } | ||
|
|
||
| // Uncomment this to have 100% coverage | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| @Test | ||
| public void shouldSubtractIfMagicNumber() { | ||
| Math math = new Math(4); | ||
| assertEquals(1, math.magicAdd(3, 4)); | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy found an issue: File contains tab characters (this is the first instance).