CTC++ Coverage Report - Execution Profile    #2/3

Directory Summary | Files Summary | Functions Summary | Execution Profile
To files: First | Previous | Next | Last | Index | No Index


File: Prime.java
Instrumentation mode: function-decision-multicondition
TER: 83 % ( 15/ 18)

Start/ End/    
True False - Line Source

  1 public class Prime
  2 {
  3    int value;
  4    int divisor;
  5 
 
  6    public Prime(int value)
  7    {
  8       this.value = value;
  9    }
  10 
 
  11    public boolean isPrime()
  12    {
  13     if (this.value == 1 || this.value == 2 || this.value == 3)
   13   T || _ || _
 - 13   F || T || _
   13   F || F || T
   13   F || F || F
   14         return true;
  15     
  16     if (this.value % 2 == 0)
   17         return false;
58   18     for (divisor = 3; divisor < this.value / 2; divisor += 2)
  19     {
58 - 20         if (this.value % divisor == 0)
 - 21             return false;
  22     }
   23     return true;
  24    }
  25 
  26 }
  27 
***TER 83% (15/18) of SOURCE FILE Prime.java

Directory Summary | Files Summary | Functions Summary | Execution Profile
To files: First | Previous | Next | Last | Top | Index | No Index