Skip to content

Commit 6db998c

Browse files
gratestasFerit Tunçer
authored andcommitted
changed expressions in term of algebraic operations with corresponding numeric results (#323)
refactored specific-energy tests * fixed *CaloriesPerGramInOneJoulePerKilogram tests * prettification * refactored watthour tests watt, kilowatt and megawatt tests should have the same number of significant figures * prettification ordered tests according to types and exponents
1 parent 420c2e3 commit 6db998c

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

UnitsNet.Tests/CustomCode/SpecificEnergyTests.cs

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,14 @@ namespace UnitsNet.Tests.CustomCode
2525
{
2626
public class SpecificEnergyTests : SpecificEnergyTestsBase
2727
{
28-
protected override double JoulesPerKilogramInOneJoulePerKilogram => 1.0;
29-
30-
protected override double CaloriesPerGramInOneJoulePerKilogram => 1.0/4.184E3;
31-
32-
protected override double KilocaloriesPerGramInOneJoulePerKilogram => 1.0/4.184E6;
33-
34-
35-
protected override double KilojoulesPerKilogramInOneJoulePerKilogram => 1.0E-3;
36-
28+
protected override double JoulesPerKilogramInOneJoulePerKilogram => 1e0;
29+
protected override double KilojoulesPerKilogramInOneJoulePerKilogram => 1e-3;
30+
protected override double MegajoulesPerKilogramInOneJoulePerKilogram => 1e-6;
31+
protected override double CaloriesPerGramInOneJoulePerKilogram => 2.3900573613766730401529636711281e-4;
32+
protected override double KilocaloriesPerGramInOneJoulePerKilogram => 2.3900573613766730401529636711281e-7;
33+
protected override double WattHoursPerKilogramInOneJoulePerKilogram => 2.77777778e-4;
3734
protected override double KilowattHoursPerKilogramInOneJoulePerKilogram => 2.77777778e-7;
38-
39-
protected override double MegajoulesPerKilogramInOneJoulePerKilogram => 1.0E-6;
40-
41-
protected override double MegawattHoursPerKilogramInOneJoulePerKilogram => 2.77777778E-10;
42-
43-
protected override double WattHoursPerKilogramInOneJoulePerKilogram => 1.0/3.6e3;
35+
protected override double MegawattHoursPerKilogramInOneJoulePerKilogram => 2.77777778e-10;
4436

4537
[Fact]
4638
public void MassTimesSpecificEnergyEqualsEnergy()

0 commit comments

Comments
 (0)