Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
jspinks
  • Loading branch information
JSpinks93 committed Mar 17, 2023
1 parent e49b56f commit b2e3c67
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class FiltersRenderingTests
{{ 'foo' | contains: 'fo' }}
{{ '\E' | escape_special_chars }}
{{ '\\E' | unescape_special_chars }}
{{ true | is_nan }}
{{ 1 | is_nan }}
{{ -2019.6 | abs }}
{{ 3 | pow: 3 }}
{{ -5 | sign }}
Expand All @@ -28,7 +28,7 @@ public class FiltersRenderingTests
true
\\E
\E
true
false
2019.6
27
-1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ public class MathFiltersTests
[Fact]
public void IsNaNTest()
{
Assert.True(Filters.IsNaN("2019.6"));
Assert.False(Filters.IsNaN(true));
Assert.False(Filters.IsNaN(string.Empty));
Assert.False(Filters.IsNaN(new Hl7v2Data()));
Assert.False(Filters.IsNan("2019.6"));
Assert.True(Filters.IsNan(true));
Assert.True(Filters.IsNan(string.Empty));
Assert.True(Filters.IsNan(new Hl7v2Data()));
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ public partial class Filters
{
private static readonly Random RandomGenerator = new Random();

public static bool IsNaN(object data)
public static bool IsNan(object data)
{
return double.TryParse(Convert.ToString(data, CultureInfo.InvariantCulture), NumberStyles.Any, NumberFormatInfo.InvariantInfo, out _);
return !double.TryParse(Convert.ToString(data, CultureInfo.InvariantCulture), NumberStyles.Any, NumberFormatInfo.InvariantInfo, out _);
}

public static double Abs(double data)
Expand Down

0 comments on commit b2e3c67

Please sign in to comment.