@@ -84,7 +84,8 @@ public abstract partial class DensityTestsBase
84
84
protected abstract double PicogramsPerMilliliterInOneKilogramPerCubicMeter { get ; }
85
85
protected abstract double PoundsPerCubicFootInOneKilogramPerCubicMeter { get ; }
86
86
protected abstract double PoundsPerCubicInchInOneKilogramPerCubicMeter { get ; }
87
- protected abstract double PoundsPerGallonInOneKilogramPerCubicMeter { get ; }
87
+ protected abstract double PoundsPerImperialGallonInOneKilogramPerCubicMeter { get ; }
88
+ protected abstract double PoundsPerUSGallonInOneKilogramPerCubicMeter { get ; }
88
89
protected abstract double SlugsPerCubicFootInOneKilogramPerCubicMeter { get ; }
89
90
protected abstract double TonnesPerCubicCentimeterInOneKilogramPerCubicMeter { get ; }
90
91
protected abstract double TonnesPerCubicMeterInOneKilogramPerCubicMeter { get ; }
@@ -123,7 +124,8 @@ public abstract partial class DensityTestsBase
123
124
protected virtual double PicogramsPerMilliliterTolerance { get { return 1e-5 ; } }
124
125
protected virtual double PoundsPerCubicFootTolerance { get { return 1e-5 ; } }
125
126
protected virtual double PoundsPerCubicInchTolerance { get { return 1e-5 ; } }
126
- protected virtual double PoundsPerGallonTolerance { get { return 1e-5 ; } }
127
+ protected virtual double PoundsPerImperialGallonTolerance { get { return 1e-5 ; } }
128
+ protected virtual double PoundsPerUSGallonTolerance { get { return 1e-5 ; } }
127
129
protected virtual double SlugsPerCubicFootTolerance { get { return 1e-5 ; } }
128
130
protected virtual double TonnesPerCubicCentimeterTolerance { get { return 1e-5 ; } }
129
131
protected virtual double TonnesPerCubicMeterTolerance { get { return 1e-5 ; } }
@@ -166,7 +168,8 @@ public void KilogramPerCubicMeterToDensityUnits()
166
168
AssertEx . EqualTolerance ( PicogramsPerMilliliterInOneKilogramPerCubicMeter , kilogrampercubicmeter . PicogramsPerMilliliter , PicogramsPerMilliliterTolerance ) ;
167
169
AssertEx . EqualTolerance ( PoundsPerCubicFootInOneKilogramPerCubicMeter , kilogrampercubicmeter . PoundsPerCubicFoot , PoundsPerCubicFootTolerance ) ;
168
170
AssertEx . EqualTolerance ( PoundsPerCubicInchInOneKilogramPerCubicMeter , kilogrampercubicmeter . PoundsPerCubicInch , PoundsPerCubicInchTolerance ) ;
169
- AssertEx . EqualTolerance ( PoundsPerGallonInOneKilogramPerCubicMeter , kilogrampercubicmeter . PoundsPerGallon , PoundsPerGallonTolerance ) ;
171
+ AssertEx . EqualTolerance ( PoundsPerImperialGallonInOneKilogramPerCubicMeter , kilogrampercubicmeter . PoundsPerImperialGallon , PoundsPerImperialGallonTolerance ) ;
172
+ AssertEx . EqualTolerance ( PoundsPerUSGallonInOneKilogramPerCubicMeter , kilogrampercubicmeter . PoundsPerUSGallon , PoundsPerUSGallonTolerance ) ;
170
173
AssertEx . EqualTolerance ( SlugsPerCubicFootInOneKilogramPerCubicMeter , kilogrampercubicmeter . SlugsPerCubicFoot , SlugsPerCubicFootTolerance ) ;
171
174
AssertEx . EqualTolerance ( TonnesPerCubicCentimeterInOneKilogramPerCubicMeter , kilogrampercubicmeter . TonnesPerCubicCentimeter , TonnesPerCubicCentimeterTolerance ) ;
172
175
AssertEx . EqualTolerance ( TonnesPerCubicMeterInOneKilogramPerCubicMeter , kilogrampercubicmeter . TonnesPerCubicMeter , TonnesPerCubicMeterTolerance ) ;
@@ -208,7 +211,8 @@ public void FromValueAndUnit()
208
211
AssertEx . EqualTolerance ( 1 , Density . From ( 1 , DensityUnit . PicogramPerMilliliter ) . PicogramsPerMilliliter , PicogramsPerMilliliterTolerance ) ;
209
212
AssertEx . EqualTolerance ( 1 , Density . From ( 1 , DensityUnit . PoundPerCubicFoot ) . PoundsPerCubicFoot , PoundsPerCubicFootTolerance ) ;
210
213
AssertEx . EqualTolerance ( 1 , Density . From ( 1 , DensityUnit . PoundPerCubicInch ) . PoundsPerCubicInch , PoundsPerCubicInchTolerance ) ;
211
- AssertEx . EqualTolerance ( 1 , Density . From ( 1 , DensityUnit . PoundPerGallon ) . PoundsPerGallon , PoundsPerGallonTolerance ) ;
214
+ AssertEx . EqualTolerance ( 1 , Density . From ( 1 , DensityUnit . PoundPerImperialGallon ) . PoundsPerImperialGallon , PoundsPerImperialGallonTolerance ) ;
215
+ AssertEx . EqualTolerance ( 1 , Density . From ( 1 , DensityUnit . PoundPerUSGallon ) . PoundsPerUSGallon , PoundsPerUSGallonTolerance ) ;
212
216
AssertEx . EqualTolerance ( 1 , Density . From ( 1 , DensityUnit . SlugPerCubicFoot ) . SlugsPerCubicFoot , SlugsPerCubicFootTolerance ) ;
213
217
AssertEx . EqualTolerance ( 1 , Density . From ( 1 , DensityUnit . TonnePerCubicCentimeter ) . TonnesPerCubicCentimeter , TonnesPerCubicCentimeterTolerance ) ;
214
218
AssertEx . EqualTolerance ( 1 , Density . From ( 1 , DensityUnit . TonnePerCubicMeter ) . TonnesPerCubicMeter , TonnesPerCubicMeterTolerance ) ;
@@ -251,7 +255,8 @@ public void As()
251
255
AssertEx . EqualTolerance ( PicogramsPerMilliliterInOneKilogramPerCubicMeter , kilogrampercubicmeter . As ( DensityUnit . PicogramPerMilliliter ) , PicogramsPerMilliliterTolerance ) ;
252
256
AssertEx . EqualTolerance ( PoundsPerCubicFootInOneKilogramPerCubicMeter , kilogrampercubicmeter . As ( DensityUnit . PoundPerCubicFoot ) , PoundsPerCubicFootTolerance ) ;
253
257
AssertEx . EqualTolerance ( PoundsPerCubicInchInOneKilogramPerCubicMeter , kilogrampercubicmeter . As ( DensityUnit . PoundPerCubicInch ) , PoundsPerCubicInchTolerance ) ;
254
- AssertEx . EqualTolerance ( PoundsPerGallonInOneKilogramPerCubicMeter , kilogrampercubicmeter . As ( DensityUnit . PoundPerGallon ) , PoundsPerGallonTolerance ) ;
258
+ AssertEx . EqualTolerance ( PoundsPerImperialGallonInOneKilogramPerCubicMeter , kilogrampercubicmeter . As ( DensityUnit . PoundPerImperialGallon ) , PoundsPerImperialGallonTolerance ) ;
259
+ AssertEx . EqualTolerance ( PoundsPerUSGallonInOneKilogramPerCubicMeter , kilogrampercubicmeter . As ( DensityUnit . PoundPerUSGallon ) , PoundsPerUSGallonTolerance ) ;
255
260
AssertEx . EqualTolerance ( SlugsPerCubicFootInOneKilogramPerCubicMeter , kilogrampercubicmeter . As ( DensityUnit . SlugPerCubicFoot ) , SlugsPerCubicFootTolerance ) ;
256
261
AssertEx . EqualTolerance ( TonnesPerCubicCentimeterInOneKilogramPerCubicMeter , kilogrampercubicmeter . As ( DensityUnit . TonnePerCubicCentimeter ) , TonnesPerCubicCentimeterTolerance ) ;
257
262
AssertEx . EqualTolerance ( TonnesPerCubicMeterInOneKilogramPerCubicMeter , kilogrampercubicmeter . As ( DensityUnit . TonnePerCubicMeter ) , TonnesPerCubicMeterTolerance ) ;
@@ -294,7 +299,8 @@ public void ConversionRoundTrip()
294
299
AssertEx . EqualTolerance ( 1 , Density . FromPicogramsPerMilliliter ( kilogrampercubicmeter . PicogramsPerMilliliter ) . KilogramsPerCubicMeter , PicogramsPerMilliliterTolerance ) ;
295
300
AssertEx . EqualTolerance ( 1 , Density . FromPoundsPerCubicFoot ( kilogrampercubicmeter . PoundsPerCubicFoot ) . KilogramsPerCubicMeter , PoundsPerCubicFootTolerance ) ;
296
301
AssertEx . EqualTolerance ( 1 , Density . FromPoundsPerCubicInch ( kilogrampercubicmeter . PoundsPerCubicInch ) . KilogramsPerCubicMeter , PoundsPerCubicInchTolerance ) ;
297
- AssertEx . EqualTolerance ( 1 , Density . FromPoundsPerGallon ( kilogrampercubicmeter . PoundsPerGallon ) . KilogramsPerCubicMeter , PoundsPerGallonTolerance ) ;
302
+ AssertEx . EqualTolerance ( 1 , Density . FromPoundsPerImperialGallon ( kilogrampercubicmeter . PoundsPerImperialGallon ) . KilogramsPerCubicMeter , PoundsPerImperialGallonTolerance ) ;
303
+ AssertEx . EqualTolerance ( 1 , Density . FromPoundsPerUSGallon ( kilogrampercubicmeter . PoundsPerUSGallon ) . KilogramsPerCubicMeter , PoundsPerUSGallonTolerance ) ;
298
304
AssertEx . EqualTolerance ( 1 , Density . FromSlugsPerCubicFoot ( kilogrampercubicmeter . SlugsPerCubicFoot ) . KilogramsPerCubicMeter , SlugsPerCubicFootTolerance ) ;
299
305
AssertEx . EqualTolerance ( 1 , Density . FromTonnesPerCubicCentimeter ( kilogrampercubicmeter . TonnesPerCubicCentimeter ) . KilogramsPerCubicMeter , TonnesPerCubicCentimeterTolerance ) ;
300
306
AssertEx . EqualTolerance ( 1 , Density . FromTonnesPerCubicMeter ( kilogrampercubicmeter . TonnesPerCubicMeter ) . KilogramsPerCubicMeter , TonnesPerCubicMeterTolerance ) ;
0 commit comments