Skip to content

Commit

Permalink
Add ifdef for decimal scale
Browse files Browse the repository at this point in the history
  • Loading branch information
NinoFloris committed Jan 31, 2024
1 parent c70e5a2 commit 1f6451b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/Npgsql.Tests/Types/NumericTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ public async Task NumericZero_WithScale()
await rdr.ReadAsync();
var value = rdr.GetFieldValue<decimal>(0);

#if NET7_0_OR_GREATER
Assert.That(value.Scale, Is.EqualTo(2));
#else
Assert.That(value.ToString(), Is.EqualTo(0.00M.ToString()));
#endif
}

public NumericTests(MultiplexingMode multiplexingMode) : base(multiplexingMode) {}
Expand Down

0 comments on commit 1f6451b

Please sign in to comment.