/[svn]/linuxsampler/trunk/src/testcases/NKSPTest.h
ViewVC logotype

Contents of /linuxsampler/trunk/src/testcases/NKSPTest.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3590 - (show annotations) (download) (as text)
Mon Sep 2 09:03:31 2019 UTC (5 months, 2 weeks ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 5392 byte(s)
NKSP: Implemented common real number math functions.

* Added built-in real number functions "round()", "ceil()", "floor()",
  "sqrt()", "log()", "log2()", "log10()", "exp()", "pow()", "sin()",
  "cos()", "tan()", "asin()", "acos()", "atan()".

* Added built-in script real number constant "~NI_MATH_PI".

* Added built-in script real number constant "~NI_MATH_E".

* Added NKSP test cases for built-in functions "round()", "ceil()",
  "floor()", "sqrt()", "log()", "log2()", "log10()", "exp()", "pow()",
  "sin()", "cos()", "tan()", "asin()", "acos()", "atan()".

* Bumped version (2.1.1.svn14).

1 #ifndef __LS_NKSPCPPUNITTESTS_H__
2 #define __LS_NKSPCPPUNITTESTS_H__
3
4 #include <cppunit/TestFixture.h>
5 #include <cppunit/extensions/HelperMacros.h>
6
7 #ifdef HAVE_CONFIG_H
8 # include <config.h>
9 #endif
10
11 class NKSPTest : public CppUnit::TestFixture {
12 CPPUNIT_TEST_SUITE(NKSPTest);
13 CPPUNIT_TEST(printTestSuiteName);
14 CPPUNIT_TEST(testNKSPBuiltInExitFunction);
15 CPPUNIT_TEST(testNKSPStringConcatOperator);
16 CPPUNIT_TEST(testNKSPNegOperator);
17 CPPUNIT_TEST(testNKSPPlusOperator);
18 CPPUNIT_TEST(testNKSPMinusOperator);
19 CPPUNIT_TEST(testNKSPModuloOperator);
20 CPPUNIT_TEST(testNKSPMultiplyOperator);
21 CPPUNIT_TEST(testNKSPDivideOperator);
22 CPPUNIT_TEST(testNKSPSmallerThanOperator);
23 CPPUNIT_TEST(testNKSPGreaterThanOperator);
24 CPPUNIT_TEST(testNKSPSmallerOrEqualOperator);
25 CPPUNIT_TEST(testNKSPGreaterOrEqualOperator);
26 CPPUNIT_TEST(testNKSPEqualOperator);
27 CPPUNIT_TEST(testNKSPUnequalOperator);
28 CPPUNIT_TEST(testNKSPLogicalAndOperator);
29 CPPUNIT_TEST(testNKSPLogicalOrOperator);
30 CPPUNIT_TEST(testNKSPLogicalNotOperator);
31 CPPUNIT_TEST(testNKSPBitwiseAndOperator);
32 CPPUNIT_TEST(testNKSPBitwiseOrOperator);
33 CPPUNIT_TEST(testNKSPBitwiseNotOperator);
34 CPPUNIT_TEST(testNKSPPrecedenceOfOperators);
35 CPPUNIT_TEST(testNKSPBuiltInMinFunction);
36 CPPUNIT_TEST(testNKSPBuiltInMaxFunction);
37 CPPUNIT_TEST(testNKSPBuiltInAbsFunction);
38 CPPUNIT_TEST(testNKSPBuiltInIncFunction);
39 CPPUNIT_TEST(testNKSPBuiltInDecFunction);
40 CPPUNIT_TEST(testNKSPBuiltInInRangeFunction);
41 CPPUNIT_TEST(testNKSPBuiltInRandomFunction);
42 CPPUNIT_TEST(testNKSPBuiltInShiftLeftFunction);
43 CPPUNIT_TEST(testNKSPBuiltInShiftRightFunction);
44 CPPUNIT_TEST(testNKSPBuiltInIntToRealFunction);
45 CPPUNIT_TEST(testNKSPBuiltInRealFunction);
46 CPPUNIT_TEST(testNKSPBuiltInRealToIntFunction);
47 CPPUNIT_TEST(testNKSPBuiltInIntFunction);
48 CPPUNIT_TEST(testNKSPBuiltInRoundFunction);
49 CPPUNIT_TEST(testNKSPBuiltInCeilFunction);
50 CPPUNIT_TEST(testNKSPBuiltInFloorFunction);
51 CPPUNIT_TEST(testNKSPBuiltInSqrtFunction);
52 CPPUNIT_TEST(testNKSPBuiltInLogFunction);
53 CPPUNIT_TEST(testNKSPBuiltInLog2Function);
54 CPPUNIT_TEST(testNKSPBuiltInLog10Function);
55 CPPUNIT_TEST(testNKSPBuiltInExpFunction);
56 CPPUNIT_TEST(testNKSPBuiltInPowFunction);
57 CPPUNIT_TEST(testNKSPBuiltInSinFunction);
58 CPPUNIT_TEST(testNKSPBuiltInCosFunction);
59 CPPUNIT_TEST(testNKSPBuiltInTanFunction);
60 CPPUNIT_TEST(testNKSPBuiltInAsinFunction);
61 CPPUNIT_TEST(testNKSPBuiltInAcosFunction);
62 CPPUNIT_TEST(testNKSPBuiltInAtanFunction);
63 CPPUNIT_TEST(testNKSPBuiltInArrayEqualFunction);
64 CPPUNIT_TEST(testNKSPBuiltInSortFunction);
65 CPPUNIT_TEST(testNKSPBuiltInNumElementsFunction);
66 CPPUNIT_TEST(testNKSPBuiltInSearchFunction);
67 CPPUNIT_TEST(testNKSPIfStatement);
68 CPPUNIT_TEST(testNKSPWhileStatement);
69 CPPUNIT_TEST_SUITE_END();
70
71 public:
72 void printTestSuiteName();
73 void testNKSPBuiltInExitFunction();
74 void testNKSPStringConcatOperator();
75 void testNKSPNegOperator();
76 void testNKSPPlusOperator();
77 void testNKSPMinusOperator();
78 void testNKSPModuloOperator();
79 void testNKSPMultiplyOperator();
80 void testNKSPDivideOperator();
81 void testNKSPSmallerThanOperator();
82 void testNKSPGreaterThanOperator();
83 void testNKSPSmallerOrEqualOperator();
84 void testNKSPGreaterOrEqualOperator();
85 void testNKSPEqualOperator();
86 void testNKSPUnequalOperator();
87 void testNKSPLogicalAndOperator();
88 void testNKSPLogicalOrOperator();
89 void testNKSPLogicalNotOperator();
90 void testNKSPBitwiseAndOperator();
91 void testNKSPBitwiseOrOperator();
92 void testNKSPBitwiseNotOperator();
93 void testNKSPPrecedenceOfOperators();
94 void testNKSPBuiltInMinFunction();
95 void testNKSPBuiltInMaxFunction();
96 void testNKSPBuiltInAbsFunction();
97 void testNKSPBuiltInIncFunction();
98 void testNKSPBuiltInDecFunction();
99 void testNKSPBuiltInInRangeFunction();
100 void testNKSPBuiltInRandomFunction();
101 void testNKSPBuiltInShiftLeftFunction();
102 void testNKSPBuiltInShiftRightFunction();
103 void testNKSPBuiltInIntToRealFunction();
104 void testNKSPBuiltInRealFunction();
105 void testNKSPBuiltInRealToIntFunction();
106 void testNKSPBuiltInIntFunction();
107 void testNKSPBuiltInRoundFunction();
108 void testNKSPBuiltInCeilFunction();
109 void testNKSPBuiltInFloorFunction();
110 void testNKSPBuiltInSqrtFunction();
111 void testNKSPBuiltInLogFunction();
112 void testNKSPBuiltInLog2Function();
113 void testNKSPBuiltInLog10Function();
114 void testNKSPBuiltInExpFunction();
115 void testNKSPBuiltInPowFunction();
116 void testNKSPBuiltInSinFunction();
117 void testNKSPBuiltInCosFunction();
118 void testNKSPBuiltInTanFunction();
119 void testNKSPBuiltInAsinFunction();
120 void testNKSPBuiltInAcosFunction();
121 void testNKSPBuiltInAtanFunction();
122 void testNKSPBuiltInArrayEqualFunction();
123 void testNKSPBuiltInSortFunction();
124 void testNKSPBuiltInNumElementsFunction();
125 void testNKSPBuiltInSearchFunction();
126 void testNKSPIfStatement();
127 void testNKSPWhileStatement();
128 };
129
130 #endif // __LS_NKSPCPPUNITTESTS_H__

  ViewVC Help
Powered by ViewVC