Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/24/16 14:12:21 (8 years ago)
Author:
bwerth
Message:

#1087 annotated unit tests

Location:
branches/HeuristicLab.Problems.MultiObjectiveTestFunctions
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/MultiObjectiveTestFunctionProblem.cs

    r13725 r13729  
    116116
    117117    [StorableConstructor]
    118     private MultiObjectiveTestFunctionProblem(bool deserializing) : base(deserializing) { }
    119     private MultiObjectiveTestFunctionProblem(MultiObjectiveTestFunctionProblem original, Cloner cloner)
     118    protected MultiObjectiveTestFunctionProblem(bool deserializing) : base(deserializing) { }
     119    protected MultiObjectiveTestFunctionProblem(MultiObjectiveTestFunctionProblem original, Cloner cloner)
    120120      : base(original, cloner) {
    121121      RegisterEventHandlers();
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Views/MOSolution.cs

    r13725 r13729  
    134134    [StorableConstructor]
    135135    protected MOSolution(bool deserializing) : base() { }
     136
     137
     138    protected MOSolution(MOSolution original, Cloner cloner) : this(original) {
     139      this.qualities = original.qualities;
     140      this.solutions = original.solutions;
     141      this.paretoFront = original.paretoFront;
     142      this.objectives = original.objectives;
     143    }
    136144    protected MOSolution(MOSolution original) : base() {
    137145      this.qualities = original.qualities;
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/MultiObjectiveTestfunctionTests/FastHyperVolumeTests.cs

    r13726 r13729  
    4040    /// </summary>
    4141    [TestMethod]
     42    [TestCategory("Problems.TestFunctions")]
     43    [TestProperty("Time", "short")]
    4244    public void SinglePointTest() {
    4345      double[] point = new double[] { 0.5, 0.5, 0.5 };
     
    6163    /// </summary>
    6264    [TestMethod]
     65    [TestCategory("Problems.TestFunctions")]
     66    [TestProperty("Time", "short")]
    6367    public void RandomSinglePointTest() {
    6468      //Front with a single Point
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/MultiObjectiveTestfunctionTests/GenerationalDistanceTest.cs

    r13673 r13729  
    3333    [TestMethod]
    3434    [ExpectedException(typeof(ArgumentException))]
     35    [TestCategory("Problems.TestFunctions")]
     36    [TestProperty("Time", "short")]
    3537    public void EmptyOptimalFrontTest() {
    3638
     
    4547    [TestMethod]
    4648    [ExpectedException(typeof(ArgumentException))]
     49    [TestCategory("Problems.TestFunctions")]
     50    [TestProperty("Time", "short")]
    4751    public void EmptyFrontTest() {
    4852
     
    5660
    5761    [TestMethod]
     62    [TestCategory("Problems.TestFunctions")]
     63    [TestProperty("Time", "short")]
    5864    public void SamePointTest() {
    5965
     
    7177
    7278    [TestMethod]
     79    [TestCategory("Problems.TestFunctions")]
     80    [TestProperty("Time", "short")]
    7381    public void SinglePointTest() {
    7482      double[] point = new double[2];
     
    8593
    8694    [TestMethod]
     95    [TestCategory("Problems.TestFunctions")]
     96    [TestProperty("Time", "short")]
    8797    public void DifferentSizesTest() {
    8898      double[] point = new double[2];
     
    102112
    103113    [TestMethod]
     114    [TestCategory("Problems.TestFunctions")]
     115    [TestProperty("Time", "short")]
    104116    public void QuadraticTest() {
    105117      double[] point = new double[2];
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/MultiObjectiveTestfunctionTests/HyperVolumeTests.cs

    r13673 r13729  
    4343    /// </summary>
    4444    [TestMethod]
     45    [TestCategory("Problems.TestFunctions")]
     46    [TestProperty("Time", "short")]
    4547    public void SinglePointTest() {
    4648
     
    98100    /// </summary>
    99101    [TestMethod]
     102    [TestCategory("Problems.TestFunctions")]
     103    [TestProperty("Time", "short")]
    100104    public void RandomSinglePointTest() {
    101105      //Front with a single Point
     
    133137      referencePoint[1] = 0;
    134138      double se = Hypervolume.Calculate(front, referencePoint, maximization);
    135       Assert.AreEqual(1.0, ne + se + nw + sw);
     139      Assert.AreEqual(1.0, ne + se + nw + sw, 1e8);
    136140    }
    137141
     
    149153    /// </summary>
    150154    [TestMethod]
     155    [TestCategory("Problems.TestFunctions")]
     156    [TestProperty("Time", "short")]
    151157    public void DiagonalPointTest() {
    152158      //Front with three points
     
    197203    [TestMethod()]
    198204    [ExpectedException(typeof(ArgumentException))]
     205    [TestCategory("Problems.TestFunctions")]
     206    [TestProperty("Time", "short")]
    199207    public void ReferencePointViolationNE() {
    200208      //Front with a single Point
     
    216224    [TestMethod()]
    217225    [ExpectedException(typeof(ArgumentException))]
     226    [TestCategory("Problems.TestFunctions")]
     227    [TestProperty("Time", "short")]
    218228    public void ReferencePointViolationNW() {
    219229      //Front with a single Point
     
    236246    [TestMethod()]
    237247    [ExpectedException(typeof(ArgumentException))]
     248    [TestCategory("Problems.TestFunctions")]
     249    [TestProperty("Time", "short")]
    238250    public void ReferencePointViolationSW() {
    239251      //Front with a single Point
     
    256268    [TestMethod()]
    257269    [ExpectedException(typeof(ArgumentException))]
     270    [TestCategory("Problems.TestFunctions")]
     271    [TestProperty("Time", "short")]
    258272    public void ReferencePointViolationSE() {
    259273      //Front with a single Point
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/MultiObjectiveTestfunctionTests/InvertedGenerationalDistanceTest.cs

    r13673 r13729  
    2929    [TestMethod]
    3030    [ExpectedException(typeof(ArgumentException))]
     31    [TestCategory("Problems.TestFunctions")]
     32    [TestProperty("Time", "short")]
    3133    public void EmptyOptimalFrontTest() {
    3234
     
    4143    [TestMethod]
    4244    [ExpectedException(typeof(ArgumentException))]
     45    [TestCategory("Problems.TestFunctions")]
     46    [TestProperty("Time", "short")]
    4347    public void EmptyFrontTest() {
    4448
     
    5256
    5357    [TestMethod]
     58    [TestCategory("Problems.TestFunctions")]
     59    [TestProperty("Time", "short")]
    5460    public void SamePointTest() {
    5561      double[] point = new double[2];
     
    6672
    6773    [TestMethod]
     74    [TestCategory("Problems.TestFunctions")]
     75    [TestProperty("Time", "short")]
    6876    public void SinglePointTest() {
    6977      double[] point = new double[2];
     
    8088
    8189    [TestMethod]
     90    [TestCategory("Problems.TestFunctions")]
     91    [TestProperty("Time", "short")]
    8292    public void DifferentSizesTest() {
    8393      double[] point = new double[2];
     
    97107
    98108    [TestMethod]
     109    [TestCategory("Problems.TestFunctions")]
     110    [TestProperty("Time", "short")]
    99111    public void QuadraticTest() {
    100112      double[] point = new double[2];
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/MultiObjectiveTestfunctionTests/SpacingTest.cs

    r13673 r13729  
    3232    [TestMethod]
    3333    [ExpectedException(typeof(ArgumentException))]
     34    [TestCategory("Problems.TestFunctions")]
     35    [TestProperty("Time", "short")]
    3436    public void EmptyFrontTest() {
    3537      double[][] front = { };
     
    3941
    4042    [TestMethod]
     43    [TestCategory("Problems.TestFunctions")]
     44    [TestProperty("Time", "short")]
    4145    public void SamePointTest() {
    4246
     
    5458
    5559    [TestMethod]
     60    [TestCategory("Problems.TestFunctions")]
     61    [TestProperty("Time", "short")]
    5662    public void SinglePointTest() {
    5763      double[] point = new double[2];
     
    6470
    6571    [TestMethod]
     72    [TestCategory("Problems.TestFunctions")]
     73    [TestProperty("Time", "short")]
    6674    public void QuadraticTest() {
    6775      double[] point = new double[2];
     
    8492
    8593    [TestMethod]
     94    [TestCategory("Problems.TestFunctions")]
     95    [TestProperty("Time", "short")]
    8696    public void RectangularTest() {
    8797      double[] point = new double[2];
     
    109119    /// </summary>
    110120    [TestMethod]
     121    [TestCategory("Problems.TestFunctions")]
     122    [TestProperty("Time", "short")]
    111123    public void DeltoidTest() {
    112124      double[] point = new double[2];
Note: See TracChangeset for help on using the changeset viewer.