/[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 3746 by schoenebeck, Sat Feb 15 12:21:34 2020 UTC revision 3747 by schoenebeck, Sun Feb 16 11:31:46 2020 UTC
# Line 2095  end on Line 2095  end on
2095          .expectExitResultUnit = VM_SECOND          .expectExitResultUnit = VM_SECOND
2096      });      });
2097    
2098        runScript({
2099            .code = R"NKSP_CODE(
2100    on init
2101      declare ~foo := 1.0  { neutral }
2102      declare $bar := 7000ms
2103      exit(~foo * real($bar))
2104    end on
2105    )NKSP_CODE",
2106            .expectRealExitResult = 7000.0,
2107            .expectExitResultUnitPrefix = { VM_MILLI },
2108            .expectExitResultUnit = VM_SECOND
2109        });
2110    
2111     runScript({
2112            .code = R"NKSP_CODE(
2113    on init
2114      declare $foo := 1  { neutral }
2115      declare $bar := 7000ms
2116      exit(real($foo) * real($bar))
2117    end on
2118    )NKSP_CODE",
2119            .expectRealExitResult = 7000.0,
2120            .expectExitResultUnitPrefix = { VM_MILLI },
2121            .expectExitResultUnit = VM_SECOND
2122        });
2123    
2124      // 'final' ('!') operator tests ...      // 'final' ('!') operator tests ...
2125    
2126      runScript({      runScript({
# Line 2352  end on Line 2378  end on
2378          .expectParseError = true // unit types are not matching          .expectParseError = true // unit types are not matching
2379      });      });
2380    
2381        runScript({
2382            .code = R"NKSP_CODE(
2383    on init
2384      declare $foo := 1000000
2385      declare $bar := 7000ms
2386      exit(real($foo) / 1000000.0 * real($bar))
2387    end on
2388    )NKSP_CODE",
2389            .expectRealExitResult = 7000.0,
2390            .expectExitResultUnitPrefix = { VM_MILLI },
2391            .expectExitResultUnit = VM_SECOND
2392        });
2393    
2394      // 'final' ('!') operator tests ...      // 'final' ('!') operator tests ...
2395    
2396      runScript({      runScript({

Legend:
Removed from v.3746  
changed lines
  Added in v.3747

  ViewVC Help
Powered by ViewVC