1 11 package org.eclipse.test.internal.performance.eval; 12 13 import java.util.Arrays ; 14 import java.util.HashSet ; 15 import java.util.Set ; 16 17 import org.eclipse.test.internal.performance.data.Assert; 18 import org.eclipse.test.internal.performance.data.Dim; 19 20 23 public abstract class AssertChecker { 24 private Set fDimensions; 25 26 public AssertChecker(Dim dimension) { 27 this(new Dim[] {dimension}); 28 } 29 30 public AssertChecker(Dim[] dimensions) { 31 fDimensions= new HashSet (); 32 fDimensions.addAll(Arrays.asList(dimensions)); 33 } 34 35 public Dim[] getDimensions() { 36 return (Dim[]) fDimensions.toArray(new Dim[fDimensions.size()]); 37 } 38 39 protected Dim getDimension() { 40 Assert.isTrue(fDimensions.size() == 1); 41 return getDimensions()[0]; 42 } 43 44 52 public abstract boolean test(StatisticsSession reference, StatisticsSession measured, StringBuffer message); 53 } 54 | Popular Tags |