Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/08/14 17:39:03 (10 years ago)
Author:
mkommend
Message:

#2144: Adapted interpreter evaluation test to explicitly check if both values (interpreted and expected) are double.NaN.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionTreeInterpreterTest.cs

    r11171 r11430  
    339339      Evaluate(interpreter, ds, "(xor 1.0 2.0 3.0)", 0, 1.0);
    340340      Evaluate(interpreter, ds, "(xor (log -1.0))", 0, -1.0);
    341       Evaluate(interpreter, ds, "(xor (log -1.0)  1.0)", 0, 1.0); 
     341      Evaluate(interpreter, ds, "(xor (log -1.0)  1.0)", 0, 1.0);
    342342
    343343      // sin, cos, tan
     
    478478      Assert.IsFalse(double.IsNaN(actual) && !double.IsNaN(expected));
    479479      Assert.IsFalse(!double.IsNaN(actual) && double.IsNaN(expected));
    480       Assert.AreEqual(expected, actual, 1.0E-12, expr);
     480      if (!double.IsNaN(actual) && !double.IsNaN(expected))
     481        Assert.AreEqual(expected, actual, 1.0E-12, expr);
    481482    }
    482483  }
Note: See TracChangeset for help on using the changeset viewer.