Skip to content

Commit

Permalink
[Test] Include non-numeric text in test_problems comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed Jan 10, 2020
1 parent 358195e commit 6925743
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 11 deletions.
5 changes: 5 additions & 0 deletions site_scons/buildutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@ def compareTextFiles(env, file1, file2):
if len(floats1) != len(floats2):
continue

# if the lines don't have the same non-numeric text,
# we're not going to pass the diff comparison
if reFloat.sub('', line1).strip() != reFloat.sub('', line2).strip():
continue

allMatch = True
for j in range(len(floats1)):
if floats1[j] == floats2[j]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ Moles: 1
pressure 1.0132e+05 Pa
density 1390 kg/m^3
mean mol. weight 66.418 kg/kmol
phase of matter unspecified
phase of matter solid

1 kg 1 kmol
--------------- ---------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ Moles: 1
pressure 1.0132e+05 Pa
density 1390 kg/m^3
mean mol. weight 66.418 kg/kmol
phase of matter unspecified
phase of matter solid

1 kg 1 kmol
--------------- ---------------
Expand Down
2 changes: 1 addition & 1 deletion test_problems/VCSnonideal/NaCl_equil/good_out.txt
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ Moles: 4.09717
pressure 1.0132e+05 Pa
density 1.1354 kg/m^3
mean mol. weight 27.777 kg/kmol
phase of matter unspecified
phase of matter gas

1 kg 1 kmol
--------------- ---------------
Expand Down
2 changes: 1 addition & 1 deletion test_problems/VPsilane_test/output_blessed.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ For species SI2, discontinuity in s/R detected at Tmid = 1000.0
pressure 100 Pa
density 1.8315e-05 kg/m^3
mean mol. weight 2.2842 kg/kmol
phase of matter unspecified
phase of matter gas

1 kg 1 kmol
--------------- ---------------
Expand Down
2 changes: 1 addition & 1 deletion test_problems/clib_test/output_blessed.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
pressure 36961 Pa
density 0.05295 kg/m^3
mean mol. weight 27.26 kg/kmol
phase of matter unspecified
phase of matter gas

1 kg 1 kmol
--------------- ---------------
Expand Down
12 changes: 6 additions & 6 deletions test_problems/silane_equil/output_blessed.txt
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
UserWarning: 'NasaPoly2::validate':
CanteraWarning: NasaPoly2::validate:
For species SI2H6, discontinuity in h/RT detected at Tmid = 1000
Value computed using low-temperature polynomial: 19.8328
Value computed using high-temperature polynomial: 19.9055

UserWarning: 'NasaPoly2::validate':
CanteraWarning: NasaPoly2::validate:
For species SI2H6, discontinuity in s/R detected at Tmid = 1000
Value computed using low-temperature polynomial: 49.5493
Value computed using high-temperature polynomial: 49.7214

UserWarning: 'NasaPoly2::validate':
CanteraWarning: NasaPoly2::validate:
For species SI3H8, discontinuity in h/RT detected at Tmid = 1000
Value computed using low-temperature polynomial: 29.3028
Value computed using high-temperature polynomial: 29.4297

UserWarning: 'NasaPoly2::validate':
CanteraWarning: NasaPoly2::validate:
For species SI3H8, discontinuity in s/R detected at Tmid = 1000
Value computed using low-temperature polynomial: 65.9731
Value computed using high-temperature polynomial: 66.2781

UserWarning: 'NasaPoly2::validate':
CanteraWarning: NasaPoly2::validate:
For species SI2, discontinuity in h/RT detected at Tmid = 1000
Value computed using low-temperature polynomial: 74.0115
Value computed using high-temperature polynomial: 74.0387

UserWarning: 'NasaPoly2::validate':
CanteraWarning: NasaPoly2::validate:
For species SI2, discontinuity in s/R detected at Tmid = 1000
Value computed using low-temperature polynomial: 32.8813
Value computed using high-temperature polynomial: 32.9489
Expand Down

0 comments on commit 6925743

Please sign in to comment.