/[svn]/linuxsampler/trunk/src/scriptvm/tests/NKSPCoreLangTest.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/scriptvm/tests/NKSPCoreLangTest.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3581 by schoenebeck, Fri Aug 30 11:40:25 2019 UTC revision 3582 by schoenebeck, Fri Aug 30 12:23:40 2019 UTC
# Line 129  static void runScript(const RunScriptOpt Line 129  static void runScript(const RunScriptOpt
129          if (opt.expectExitResultUnit) {          if (opt.expectExitResultUnit) {
130              VMExpr* resExpr = execCtx->exitResult();              VMExpr* resExpr = execCtx->exitResult();
131              TEST_ASSERT(resExpr);              TEST_ASSERT(resExpr);
132              VMScalarNumberExpr* numberExpr = resExpr->asScalarNumberExpr();              VMNumberExpr* numberExpr = resExpr->asNumber();
133              TEST_ASSERT(numberExpr);              TEST_ASSERT(numberExpr);
134              TEST_ASSERT(numberExpr->unitType() == *opt.expectExitResultUnit);              TEST_ASSERT(numberExpr->unitType() == *opt.expectExitResultUnit);
135          }          }
136          if (!opt.expectExitResultUnitPrefix.empty()) {          if (!opt.expectExitResultUnitPrefix.empty()) {
137              VMExpr* resExpr = execCtx->exitResult();              VMExpr* resExpr = execCtx->exitResult();
138              TEST_ASSERT(resExpr);              TEST_ASSERT(resExpr);
139              VMScalarNumberExpr* numberExpr = resExpr->asScalarNumberExpr();              VMNumberExpr* numberExpr = resExpr->asNumber();
140              TEST_ASSERT(numberExpr);              TEST_ASSERT(numberExpr);
141              auto prefixes = opt.expectExitResultUnitPrefix;              auto prefixes = opt.expectExitResultUnitPrefix;
142              if (*prefixes.rbegin() != VM_NO_PREFIX)              if (*prefixes.rbegin() != VM_NO_PREFIX)
# Line 152  static void runScript(const RunScriptOpt Line 152  static void runScript(const RunScriptOpt
152          if (opt.expectExitResultFinal) {          if (opt.expectExitResultFinal) {
153              VMExpr* resExpr = execCtx->exitResult();              VMExpr* resExpr = execCtx->exitResult();
154              TEST_ASSERT(resExpr);              TEST_ASSERT(resExpr);
155              VMScalarNumberExpr* numberExpr = resExpr->asScalarNumberExpr();              VMNumberExpr* numberExpr = resExpr->asNumber();
156              TEST_ASSERT(numberExpr);              TEST_ASSERT(numberExpr);
157              TEST_ASSERT(numberExpr->isFinal() == *opt.expectExitResultFinal);              TEST_ASSERT(numberExpr->isFinal() == *opt.expectExitResultFinal);
158          }          }

Legend:
Removed from v.3581  
changed lines
  Added in v.3582

  ViewVC Help
Powered by ViewVC