/[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 3743 by schoenebeck, Mon Jan 27 16:34:44 2020 UTC revision 3744 by schoenebeck, Sat Feb 15 11:50:02 2020 UTC
# Line 8881  end on Line 8881  end on
8881          .expectExitResultUnit = VM_BEL          .expectExitResultUnit = VM_BEL
8882      });      });
8883    
8884        runScript({
8885            .code = R"NKSP_CODE(
8886    on init
8887      declare $foo := 7000ms
8888      exit( int_to_real($foo) )
8889    end on
8890    )NKSP_CODE",
8891            .expectRealExitResult = 7000.0,
8892            .expectExitResultUnitPrefix = { VM_MILLI },
8893            .expectExitResultUnit = VM_SECOND
8894        });
8895    
8896        runScript({
8897            .code = R"NKSP_CODE(
8898    on init
8899      declare $foo := 7000ms
8900      declare @s := "" & int_to_real($foo)
8901      exit( @s )
8902    end on
8903    )NKSP_CODE",
8904            .expectStringExitResult = "7000ms",
8905        });
8906    
8907      // 'final' ('!') operator tests ...      // 'final' ('!') operator tests ...
8908    
8909      runScript({      runScript({
# Line 8959  end on Line 8982  end on
8982          .expectExitResultUnit = VM_BEL          .expectExitResultUnit = VM_BEL
8983      });      });
8984    
8985        runScript({
8986            .code = R"NKSP_CODE(
8987    on init
8988      declare $foo := 7000ms
8989      exit( real($foo) )
8990    end on
8991    )NKSP_CODE",
8992            .expectRealExitResult = 7000.0,
8993            .expectExitResultUnitPrefix = { VM_MILLI },
8994            .expectExitResultUnit = VM_SECOND
8995        });
8996    
8997        runScript({
8998            .code = R"NKSP_CODE(
8999    on init
9000      declare $foo := 7000ms
9001      declare @s := "" & real($foo)
9002      exit( @s )
9003    end on
9004    )NKSP_CODE",
9005            .expectStringExitResult = "7000ms",
9006        });
9007    
9008      // 'final' ('!') operator tests ...      // 'final' ('!') operator tests ...
9009    
9010      runScript({      runScript({
# Line 9026  end on Line 9072  end on
9072          .expectExitResultUnit = VM_BEL          .expectExitResultUnit = VM_BEL
9073      });      });
9074    
9075        runScript({
9076            .code = R"NKSP_CODE(
9077    on init
9078      declare ~foo := 9000.0us
9079      exit( real_to_int(~foo) )
9080    end on
9081    )NKSP_CODE",
9082            .expectIntExitResult = 9000.0,
9083            .expectExitResultUnitPrefix = { VM_MICRO },
9084            .expectExitResultUnit = VM_SECOND
9085        });
9086    
9087        runScript({
9088            .code = R"NKSP_CODE(
9089    on init
9090      declare ~foo := 9000.0us
9091      declare @s := "" & real_to_int(~foo)
9092      exit( @s )
9093    end on
9094    )NKSP_CODE",
9095            .expectStringExitResult = "9000us",
9096        });
9097    
9098      // 'final' ('!') operator tests ...      // 'final' ('!') operator tests ...
9099    
9100      runScript({      runScript({
# Line 9093  end on Line 9162  end on
9162          .expectExitResultUnit = VM_BEL          .expectExitResultUnit = VM_BEL
9163      });      });
9164    
9165        runScript({
9166            .code = R"NKSP_CODE(
9167    on init
9168      declare ~foo := 9000.0us
9169      exit( int(~foo) )
9170    end on
9171    )NKSP_CODE",
9172            .expectIntExitResult = 9000.0,
9173            .expectExitResultUnitPrefix = { VM_MICRO },
9174            .expectExitResultUnit = VM_SECOND
9175        });
9176    
9177        runScript({
9178            .code = R"NKSP_CODE(
9179    on init
9180      declare ~foo := 9000.0us
9181      declare @s := "" & int(~foo)
9182      exit( @s )
9183    end on
9184    )NKSP_CODE",
9185            .expectStringExitResult = "9000us",
9186        });
9187    
9188      // 'final' ('!') operator tests ...      // 'final' ('!') operator tests ...
9189    
9190      runScript({      runScript({

Legend:
Removed from v.3743  
changed lines
  Added in v.3744

  ViewVC Help
Powered by ViewVC