Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6822


Ignore:
Timestamp:
09/22/11 14:09:49 (11 years ago)
Author:
mkommend
Message:

#1479: Updated GP Unit tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab/3.3/Tests/SamplesTest.cs

    r6609 r6822  
    190190      ga.SetSeedRandomly.Value = false;
    191191      RunAlgorithm(ga);
    192       if (!Environment.Is64BitProcess) {
    193         Assert.AreEqual(89, GetDoubleResult(ga, "BestQuality"));
    194         Assert.AreEqual(68.635, GetDoubleResult(ga, "CurrentAverageQuality"));
    195         Assert.AreEqual(0, GetDoubleResult(ga, "CurrentWorstQuality"));
    196         Assert.AreEqual(50950, GetIntResult(ga, "EvaluatedSolutions"));
    197       } else {
    198         Assert.AreEqual(82, GetDoubleResult(ga, "BestQuality"));
    199         Assert.AreEqual(65.594, GetDoubleResult(ga, "CurrentAverageQuality"));
    200         Assert.AreEqual(0, GetDoubleResult(ga, "CurrentWorstQuality"));
    201         Assert.AreEqual(50950, GetIntResult(ga, "EvaluatedSolutions"));
    202       }
     192      Assert.AreEqual(89, GetDoubleResult(ga, "BestQuality"));
     193      Assert.AreEqual(70.974, GetDoubleResult(ga, "CurrentAverageQuality"));
     194      Assert.AreEqual(0, GetDoubleResult(ga, "CurrentWorstQuality"));
     195      Assert.AreEqual(50950, GetIntResult(ga, "EvaluatedSolutions"));
    203196    }
    204197
     
    248241      ga.SetSeedRandomly.Value = false;
    249242      RunAlgorithm(ga);
    250       if (!Environment.Is64BitProcess) {
    251         Assert.AreEqual(0.82895806566669916, GetDoubleResult(ga, "BestQuality"));
    252         Assert.AreEqual(0.50808259256341926, GetDoubleResult(ga, "CurrentAverageQuality"));
    253         Assert.AreEqual(0, GetDoubleResult(ga, "CurrentWorstQuality"));
    254         Assert.AreEqual(50950, GetIntResult(ga, "EvaluatedSolutions"));
    255       } else {
    256         Assert.AreEqual(0.80376816256837447, GetDoubleResult(ga, "BestQuality"));
    257         Assert.AreEqual(0.56912229251001056, GetDoubleResult(ga, "CurrentAverageQuality"));
    258         Assert.AreEqual(0, GetDoubleResult(ga, "CurrentWorstQuality"));
    259         Assert.AreEqual(50950, GetIntResult(ga, "EvaluatedSolutions"));
    260       }
     243      Assert.AreEqual(0.86679405518127783, GetDoubleResult(ga, "BestQuality"));
     244      Assert.AreEqual(0.66574774940005843, GetDoubleResult(ga, "CurrentAverageQuality"));
     245      Assert.AreEqual(0, GetDoubleResult(ga, "CurrentWorstQuality"));
     246      Assert.AreEqual(50950, GetIntResult(ga, "EvaluatedSolutions"));
    261247    }
    262248
     
    370356      ga.SetSeedRandomly.Value = false;
    371357      RunAlgorithm(ga);
    372       if (!Environment.Is64BitProcess) {
    373         Assert.AreEqual(0.13607488888377872, GetDoubleResult(ga, "BestQuality"));
    374         Assert.AreEqual(2.1634701155600293, GetDoubleResult(ga, "CurrentAverageQuality"));
    375         Assert.AreEqual(100.62175156249987, GetDoubleResult(ga, "CurrentWorstQuality"));
    376         Assert.AreEqual(100900, GetIntResult(ga, "EvaluatedSolutions"));
    377       } else {
    378         Assert.AreEqual(0.1343874434023121, GetDoubleResult(ga, "BestQuality"));
    379         Assert.AreEqual(5.1125971846526053, GetDoubleResult(ga, "CurrentAverageQuality"));
    380         Assert.AreEqual(100.62175156249987, GetDoubleResult(ga, "CurrentWorstQuality"));
    381         Assert.AreEqual(100900, GetIntResult(ga, "EvaluatedSolutions"));
    382       }
     358      Assert.AreEqual(0.14089062240881498, GetDoubleResult(ga, "BestQuality"));
     359      Assert.AreEqual(2.6490910151578269, GetDoubleResult(ga, "CurrentAverageQuality"));
     360      Assert.AreEqual(100.62175156249987, GetDoubleResult(ga, "CurrentWorstQuality"));
     361      Assert.AreEqual(100900, GetIntResult(ga, "EvaluatedSolutions"));
    383362    }
    384363
Note: See TracChangeset for help on using the changeset viewer.