| 1 | package rs.etf.ts.calculator; | |
| 2 | import rs.etf.ts.storage.InMemoryStorage; | |
| 3 | import rs.etf.ts.storage.ResultStorage; | |
| 4 | ||
| 5 | import java.util.Scanner; | |
| 6 | ||
| 7 | public class Main { | |
| 8 | ||
| 9 | public static void main(String[] args) { | |
| 10 | ResultStorage storage = new InMemoryStorage(); | |
| 11 | Calculator calculator = new Calculator(storage); | |
| 12 | Scanner in = new Scanner(System.in); | |
| 13 | ||
| 14 |
1
1. main : removed call to rs/etf/ts/calculator/Calculator::switchOn → NO_COVERAGE |
calculator.switchOn(); |
| 15 |
1
1. main : removed call to java/io/PrintStream::println → NO_COVERAGE |
System.out.println("...Switch On..."); |
| 16 | | |
| 17 |
1
1. main : removed call to rs/etf/ts/calculator/Calculator::clear → NO_COVERAGE |
calculator.clear(); |
| 18 |
1
1. main : removed call to java/io/PrintStream::println → NO_COVERAGE |
System.out.println("Unesite prvi broj"); |
| 19 | int n = in.nextInt(); | |
| 20 |
1
1. main : removed call to rs/etf/ts/calculator/Calculator::add → NO_COVERAGE |
calculator.add(n); |
| 21 | | |
| 22 |
1
1. main : removed call to java/io/PrintStream::println → NO_COVERAGE |
System.out.println("Unesite operaciju"); |
| 23 | char o = in.next().charAt(0); | |
| 24 | | |
| 25 |
2
1. main : negated conditional → NO_COVERAGE 2. main : negated conditional → NO_COVERAGE |
while ( o == '+' || o == '-' ) { |
| 26 |
1
1. main : removed call to java/io/PrintStream::println → NO_COVERAGE |
System.out.println("Unesite novi broj"); |
| 27 | n = in.nextInt(); | |
| 28 | ||
| 29 |
1
1. main : negated conditional → NO_COVERAGE |
if ( o == '+' ) |
| 30 |
1
1. main : removed call to rs/etf/ts/calculator/Calculator::add → NO_COVERAGE |
calculator.add(n); |
| 31 | else | |
| 32 |
1
1. main : removed call to rs/etf/ts/calculator/Calculator::substract → NO_COVERAGE |
calculator.substract(n); |
| 33 |
1
1. main : removed call to java/io/PrintStream::println → NO_COVERAGE |
System.out.println("Rezultat = " + calculator.getResult()); |
| 34 |
1
1. main : removed call to java/io/PrintStream::println → NO_COVERAGE |
System.out.println("Unesite operaciju"); |
| 35 | o = in.next().charAt(0); | |
| 36 | } | |
| 37 | | |
| 38 |
1
1. main : removed call to rs/etf/ts/calculator/Calculator::switchOff → NO_COVERAGE |
calculator.switchOff(); |
| 39 |
1
1. main : removed call to java/io/PrintStream::println → NO_COVERAGE |
System.out.println("...Switch Off..."); |
| 40 | } | |
| 41 | } | |
Mutations | ||
| 14 |
1.1 |
|
| 15 |
1.1 |
|
| 17 |
1.1 |
|
| 18 |
1.1 |
|
| 20 |
1.1 |
|
| 22 |
1.1 |
|
| 25 |
1.1 2.2 |
|
| 26 |
1.1 |
|
| 29 |
1.1 |
|
| 30 |
1.1 |
|
| 32 |
1.1 |
|
| 33 |
1.1 |
|
| 34 |
1.1 |
|
| 38 |
1.1 |
|
| 39 |
1.1 |