Skip to content

Commit

Permalink
Added convertUnits mmHg test
Browse files Browse the repository at this point in the history
  • Loading branch information
david-polak authored and OpenModelica-Hudson committed Oct 31, 2017
1 parent 4ccbc57 commit effc952
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions openmodelica/interactive-API/ConvertUnits.mos
Expand Up @@ -6,9 +6,12 @@ convertUnits("K","degF");getErrorString();
convertUnits("degC","degF");getErrorString();
convertUnits("degF","degC");getErrorString();
convertUnits("K","Unknown");getErrorString();
convertUnits("Pa","mmHg");getErrorString();
convertUnits("m3/Pa","ml/mmHg");getErrorString();

getDerivedUnits("K");getErrorString();
getDerivedUnits("W");getErrorString();
getDerivedUnits("Pa");getErrorString();
getDerivedUnits("n");getErrorString();

// Result:
Expand All @@ -25,10 +28,16 @@ getDerivedUnits("n");getErrorString();
// (false,1.0,0.0)
// "Error: error parsing unit Unknown
// "
// (true,133.322387415,0.0)
// ""
// (true,7.500615758456563e-09,0.0)
// ""
// {"degC","degF","degRk"}
// ""
// {"VA","var"}
// ""
// {"bar","inWG","mmHg","psi"}
// ""
// {}
// "Error: error parsing unit n
// "
Expand Down

0 comments on commit effc952

Please sign in to comment.