aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common/Tests/LSL_TypesTestLSLFloat.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/Tests/LSL_TypesTestLSLFloat.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/Tests/LSL_TypesTestLSLFloat.cs583
1 files changed, 0 insertions, 583 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/Tests/LSL_TypesTestLSLFloat.cs b/OpenSim/Region/ScriptEngine/Common/Tests/LSL_TypesTestLSLFloat.cs
deleted file mode 100644
index d89bb87..0000000
--- a/OpenSim/Region/ScriptEngine/Common/Tests/LSL_TypesTestLSLFloat.cs
+++ /dev/null
@@ -1,583 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System.Collections.Generic;
29using NUnit.Framework;
30using OpenSim.Tests.Common;
31using OpenSim.Region.ScriptEngine.Common;
32
33namespace OpenSim.Region.ScriptEngine.Common.Tests
34{
35 [TestFixture]
36 public class LSL_TypesTestLSLFloat
37 {
38 // Used for testing equality of two floats.
39 private double _lowPrecisionTolerance = 0.000001;
40
41 private Dictionary<int, double> m_intDoubleSet;
42 private Dictionary<double, double> m_doubleDoubleSet;
43 private Dictionary<double, int> m_doubleIntSet;
44 private Dictionary<double, int> m_doubleUintSet;
45 private Dictionary<string, double> m_stringDoubleSet;
46 private Dictionary<double, string> m_doubleStringSet;
47 private List<int> m_intList;
48 private List<double> m_doubleList;
49
50 /// <summary>
51 /// Sets up dictionaries and arrays used in the tests.
52 /// </summary>
53 [TestFixtureSetUp]
54 public void SetUpDataSets()
55 {
56 m_intDoubleSet = new Dictionary<int, double>();
57 m_intDoubleSet.Add(2, 2.0);
58 m_intDoubleSet.Add(-2, -2.0);
59 m_intDoubleSet.Add(0, 0.0);
60 m_intDoubleSet.Add(1, 1.0);
61 m_intDoubleSet.Add(-1, -1.0);
62 m_intDoubleSet.Add(999999999, 999999999.0);
63 m_intDoubleSet.Add(-99999999, -99999999.0);
64
65 m_doubleDoubleSet = new Dictionary<double, double>();
66 m_doubleDoubleSet.Add(2.0, 2.0);
67 m_doubleDoubleSet.Add(-2.0, -2.0);
68 m_doubleDoubleSet.Add(0.0, 0.0);
69 m_doubleDoubleSet.Add(1.0, 1.0);
70 m_doubleDoubleSet.Add(-1.0, -1.0);
71 m_doubleDoubleSet.Add(999999999.0, 999999999.0);
72 m_doubleDoubleSet.Add(-99999999.0, -99999999.0);
73 m_doubleDoubleSet.Add(0.5, 0.5);
74 m_doubleDoubleSet.Add(0.0005, 0.0005);
75 m_doubleDoubleSet.Add(0.6805, 0.6805);
76 m_doubleDoubleSet.Add(-0.5, -0.5);
77 m_doubleDoubleSet.Add(-0.0005, -0.0005);
78 m_doubleDoubleSet.Add(-0.6805, -0.6805);
79 m_doubleDoubleSet.Add(548.5, 548.5);
80 m_doubleDoubleSet.Add(2.0005, 2.0005);
81 m_doubleDoubleSet.Add(349485435.6805, 349485435.6805);
82 m_doubleDoubleSet.Add(-548.5, -548.5);
83 m_doubleDoubleSet.Add(-2.0005, -2.0005);
84 m_doubleDoubleSet.Add(-349485435.6805, -349485435.6805);
85
86 m_doubleIntSet = new Dictionary<double, int>();
87 m_doubleIntSet.Add(2.0, 2);
88 m_doubleIntSet.Add(-2.0, -2);
89 m_doubleIntSet.Add(0.0, 0);
90 m_doubleIntSet.Add(1.0, 1);
91 m_doubleIntSet.Add(-1.0, -1);
92 m_doubleIntSet.Add(999999999.0, 999999999);
93 m_doubleIntSet.Add(-99999999.0, -99999999);
94 m_doubleIntSet.Add(0.5, 0);
95 m_doubleIntSet.Add(0.0005, 0);
96 m_doubleIntSet.Add(0.6805, 0);
97 m_doubleIntSet.Add(-0.5, 0);
98 m_doubleIntSet.Add(-0.0005, 0);
99 m_doubleIntSet.Add(-0.6805, 0);
100 m_doubleIntSet.Add(548.5, 548);
101 m_doubleIntSet.Add(2.0005, 2);
102 m_doubleIntSet.Add(349485435.6805, 349485435);
103 m_doubleIntSet.Add(-548.5, -548);
104 m_doubleIntSet.Add(-2.0005, -2);
105 m_doubleIntSet.Add(-349485435.6805, -349485435);
106
107 m_doubleUintSet = new Dictionary<double, int>();
108 m_doubleUintSet.Add(2.0, 2);
109 m_doubleUintSet.Add(-2.0, 2);
110 m_doubleUintSet.Add(0.0, 0);
111 m_doubleUintSet.Add(1.0, 1);
112 m_doubleUintSet.Add(-1.0, 1);
113 m_doubleUintSet.Add(999999999.0, 999999999);
114 m_doubleUintSet.Add(-99999999.0, 99999999);
115 m_doubleUintSet.Add(0.5, 0);
116 m_doubleUintSet.Add(0.0005, 0);
117 m_doubleUintSet.Add(0.6805, 0);
118 m_doubleUintSet.Add(-0.5, 0);
119 m_doubleUintSet.Add(-0.0005, 0);
120 m_doubleUintSet.Add(-0.6805, 0);
121 m_doubleUintSet.Add(548.5, 548);
122 m_doubleUintSet.Add(2.0005, 2);
123 m_doubleUintSet.Add(349485435.6805, 349485435);
124 m_doubleUintSet.Add(-548.5, 548);
125 m_doubleUintSet.Add(-2.0005, 2);
126 m_doubleUintSet.Add(-349485435.6805, 349485435);
127
128 m_stringDoubleSet = new Dictionary<string, double>();
129 m_stringDoubleSet.Add("2", 2.0);
130 m_stringDoubleSet.Add("-2", -2.0);
131 m_stringDoubleSet.Add("1", 1.0);
132 m_stringDoubleSet.Add("-1", -1.0);
133 m_stringDoubleSet.Add("0", 0.0);
134 m_stringDoubleSet.Add("999999999.0", 999999999.0);
135 m_stringDoubleSet.Add("-99999999.0", -99999999.0);
136 m_stringDoubleSet.Add("0.5", 0.5);
137 m_stringDoubleSet.Add("0.0005", 0.0005);
138 m_stringDoubleSet.Add("0.6805", 0.6805);
139 m_stringDoubleSet.Add("-0.5", -0.5);
140 m_stringDoubleSet.Add("-0.0005", -0.0005);
141 m_stringDoubleSet.Add("-0.6805", -0.6805);
142 m_stringDoubleSet.Add("548.5", 548.5);
143 m_stringDoubleSet.Add("2.0005", 2.0005);
144 m_stringDoubleSet.Add("349485435.6805", 349485435.6805);
145 m_stringDoubleSet.Add("-548.5", -548.5);
146 m_stringDoubleSet.Add("-2.0005", -2.0005);
147 m_stringDoubleSet.Add("-349485435.6805", -349485435.6805);
148
149 m_doubleStringSet = new Dictionary<double, string>();
150 m_doubleStringSet.Add(2.0, "2.000000");
151 m_doubleStringSet.Add(-2.0, "-2.000000");
152 m_doubleStringSet.Add(1.0, "1.000000");
153 m_doubleStringSet.Add(-1.0, "-1.000000");
154 m_doubleStringSet.Add(0.0, "0.000000");
155 m_doubleStringSet.Add(999999999.0, "999999999.000000");
156 m_doubleStringSet.Add(-99999999.0, "-99999999.000000");
157 m_doubleStringSet.Add(0.5, "0.500000");
158 m_doubleStringSet.Add(0.0005, "0.000500");
159 m_doubleStringSet.Add(0.6805, "0.680500");
160 m_doubleStringSet.Add(-0.5, "-0.500000");
161 m_doubleStringSet.Add(-0.0005, "-0.000500");
162 m_doubleStringSet.Add(-0.6805, "-0.680500");
163 m_doubleStringSet.Add(548.5, "548.500000");
164 m_doubleStringSet.Add(2.0005, "2.000500");
165 m_doubleStringSet.Add(349485435.6805, "349485435.680500");
166 m_doubleStringSet.Add(-548.5, "-548.500000");
167 m_doubleStringSet.Add(-2.0005, "-2.000500");
168 m_doubleStringSet.Add(-349485435.6805, "-349485435.680500");
169
170 m_doubleList = new List<double>();
171 m_doubleList.Add(2.0);
172 m_doubleList.Add(-2.0);
173 m_doubleList.Add(1.0);
174 m_doubleList.Add(-1.0);
175 m_doubleList.Add(999999999.0);
176 m_doubleList.Add(-99999999.0);
177 m_doubleList.Add(0.5);
178 m_doubleList.Add(0.0005);
179 m_doubleList.Add(0.6805);
180 m_doubleList.Add(-0.5);
181 m_doubleList.Add(-0.0005);
182 m_doubleList.Add(-0.6805);
183 m_doubleList.Add(548.5);
184 m_doubleList.Add(2.0005);
185 m_doubleList.Add(349485435.6805);
186 m_doubleList.Add(-548.5);
187 m_doubleList.Add(-2.0005);
188 m_doubleList.Add(-349485435.6805);
189
190 m_intList = new List<int>();
191 m_intList.Add(2);
192 m_intList.Add(-2);
193 m_intList.Add(0);
194 m_intList.Add(1);
195 m_intList.Add(-1);
196 m_intList.Add(999999999);
197 m_intList.Add(-99999999);
198 }
199
200 /// <summary>
201 /// Tests constructing a LSLFloat from an integer.
202 /// </summary>
203 [Test]
204 public void TestConstructFromInt()
205 {
206 LSL_Types.LSLFloat testFloat;
207
208 foreach (KeyValuePair<int, double> number in m_intDoubleSet)
209 {
210 testFloat = new LSL_Types.LSLFloat(number.Key);
211 Assert.That(testFloat.value, new DoubleToleranceConstraint(number.Value, _lowPrecisionTolerance));
212 }
213 }
214
215 /// <summary>
216 /// Tests constructing a LSLFloat from a double.
217 /// </summary>
218 [Test]
219 public void TestConstructFromDouble()
220 {
221 LSL_Types.LSLFloat testFloat;
222
223 foreach (KeyValuePair<double, double> number in m_doubleDoubleSet)
224 {
225 testFloat = new LSL_Types.LSLFloat(number.Key);
226 Assert.That(testFloat.value, new DoubleToleranceConstraint(number.Value, _lowPrecisionTolerance));
227 }
228 }
229
230 /// <summary>
231 /// Tests LSLFloat is correctly cast explicitly to integer.
232 /// </summary>
233 [Test]
234 public void TestExplicitCastLSLFloatToInt()
235 {
236 int testNumber;
237
238 foreach (KeyValuePair<double, int> number in m_doubleIntSet)
239 {
240 testNumber = (int) new LSL_Types.LSLFloat(number.Key);
241 Assert.AreEqual(number.Value, testNumber, "Converting double " + number.Key + ", expecting int " + number.Value);
242 }
243 }
244
245 /// <summary>
246 /// Tests LSLFloat is correctly cast explicitly to unsigned integer.
247 /// </summary>
248 [Test]
249 public void TestExplicitCastLSLFloatToUint()
250 {
251 uint testNumber;
252
253 foreach (KeyValuePair<double, int> number in m_doubleUintSet)
254 {
255 testNumber = (uint) new LSL_Types.LSLFloat(number.Key);
256 Assert.AreEqual(number.Value, testNumber, "Converting double " + number.Key + ", expecting uint " + number.Value);
257 }
258 }
259
260 /// <summary>
261 /// Tests LSLFloat is correctly cast implicitly to Boolean if non-zero.
262 /// </summary>
263 [Test]
264 public void TestImplicitCastLSLFloatToBooleanTrue()
265 {
266 LSL_Types.LSLFloat testFloat;
267 bool testBool;
268
269 foreach (double number in m_doubleList)
270 {
271 testFloat = new LSL_Types.LSLFloat(number);
272 testBool = testFloat;
273
274 Assert.IsTrue(testBool);
275 }
276 }
277
278 /// <summary>
279 /// Tests LSLFloat is correctly cast implicitly to Boolean if zero.
280 /// </summary>
281 [Test]
282 public void TestImplicitCastLSLFloatToBooleanFalse()
283 {
284 LSL_Types.LSLFloat testFloat = new LSL_Types.LSLFloat(0.0);
285 bool testBool = testFloat;
286
287 Assert.IsFalse(testBool);
288 }
289
290 /// <summary>
291 /// Tests integer is correctly cast implicitly to LSLFloat.
292 /// </summary>
293 [Test]
294 public void TestImplicitCastIntToLSLFloat()
295 {
296 LSL_Types.LSLFloat testFloat;
297
298 foreach (int number in m_intList)
299 {
300 testFloat = number;
301 Assert.That(testFloat.value, new DoubleToleranceConstraint(number, _lowPrecisionTolerance));
302 }
303 }
304
305 /// <summary>
306 /// Tests LSLInteger is correctly cast implicitly to LSLFloat.
307 /// </summary>
308 [Test]
309 public void TestImplicitCastLSLIntegerToLSLFloat()
310 {
311 LSL_Types.LSLFloat testFloat;
312
313 foreach (int number in m_intList)
314 {
315 testFloat = new LSL_Types.LSLInteger(number);
316 Assert.That(testFloat.value, new DoubleToleranceConstraint(number, _lowPrecisionTolerance));
317 }
318 }
319
320 /// <summary>
321 /// Tests LSLInteger is correctly cast explicitly to LSLFloat.
322 /// </summary>
323 [Test]
324 public void TestExplicitCastLSLIntegerToLSLFloat()
325 {
326 LSL_Types.LSLFloat testFloat;
327
328 foreach (int number in m_intList)
329 {
330 testFloat = (LSL_Types.LSLFloat) new LSL_Types.LSLInteger(number);
331 Assert.That(testFloat.value, new DoubleToleranceConstraint(number, _lowPrecisionTolerance));
332 }
333 }
334
335 /// <summary>
336 /// Tests string is correctly cast explicitly to LSLFloat.
337 /// </summary>
338 [Test]
339 public void TestExplicitCastStringToLSLFloat()
340 {
341 LSL_Types.LSLFloat testFloat;
342
343 foreach (KeyValuePair<string, double> number in m_stringDoubleSet)
344 {
345 testFloat = (LSL_Types.LSLFloat) number.Key;
346 Assert.That(testFloat.value, new DoubleToleranceConstraint(number.Value, _lowPrecisionTolerance));
347 }
348 }
349
350 /// <summary>
351 /// Tests LSLString is correctly cast implicitly to LSLFloat.
352 /// </summary>
353 [Test]
354 public void TestExplicitCastLSLStringToLSLFloat()
355 {
356 LSL_Types.LSLFloat testFloat;
357
358 foreach (KeyValuePair<string, double> number in m_stringDoubleSet)
359 {
360 testFloat = (LSL_Types.LSLFloat) new LSL_Types.LSLString(number.Key);
361 Assert.That(testFloat.value, new DoubleToleranceConstraint(number.Value, _lowPrecisionTolerance));
362 }
363 }
364
365 /// <summary>
366 /// Tests double is correctly cast implicitly to LSLFloat.
367 /// </summary>
368 [Test]
369 public void TestImplicitCastDoubleToLSLFloat()
370 {
371 LSL_Types.LSLFloat testFloat;
372
373 foreach (double number in m_doubleList)
374 {
375 testFloat = number;
376 Assert.That(testFloat.value, new DoubleToleranceConstraint(number, _lowPrecisionTolerance));
377 }
378 }
379
380 /// <summary>
381 /// Tests LSLFloat is correctly cast implicitly to double.
382 /// </summary>
383 [Test]
384 public void TestImplicitCastLSLFloatToDouble()
385 {
386 double testNumber;
387 LSL_Types.LSLFloat testFloat;
388
389 foreach (double number in m_doubleList)
390 {
391 testFloat = new LSL_Types.LSLFloat(number);
392 testNumber = testFloat;
393
394 Assert.That(testNumber, new DoubleToleranceConstraint(number, _lowPrecisionTolerance));
395 }
396 }
397
398 /// <summary>
399 /// Tests the equality (==) operator.
400 /// </summary>
401 [Test]
402 public void TestEqualsOperator()
403 {
404 LSL_Types.LSLFloat testFloatA, testFloatB;
405
406 foreach (double number in m_doubleList)
407 {
408 testFloatA = new LSL_Types.LSLFloat(number);
409 testFloatB = new LSL_Types.LSLFloat(number);
410 Assert.IsTrue(testFloatA == testFloatB);
411
412 testFloatB = new LSL_Types.LSLFloat(number + 1.0);
413 Assert.IsFalse(testFloatA == testFloatB);
414 }
415 }
416
417 /// <summary>
418 /// Tests the inequality (!=) operator.
419 /// </summary>
420 [Test]
421 public void TestNotEqualOperator()
422 {
423 LSL_Types.LSLFloat testFloatA, testFloatB;
424
425 foreach (double number in m_doubleList)
426 {
427 testFloatA = new LSL_Types.LSLFloat(number);
428 testFloatB = new LSL_Types.LSLFloat(number + 1.0);
429 Assert.IsTrue(testFloatA != testFloatB);
430
431 testFloatB = new LSL_Types.LSLFloat(number);
432 Assert.IsFalse(testFloatA != testFloatB);
433 }
434 }
435
436 /// <summary>
437 /// Tests the increment operator.
438 /// </summary>
439 [Test]
440 public void TestIncrementOperator()
441 {
442 LSL_Types.LSLFloat testFloat;
443 double testNumber;
444
445 foreach (double number in m_doubleList)
446 {
447 testFloat = new LSL_Types.LSLFloat(number);
448
449 testNumber = testFloat++;
450 Assert.That(testNumber, new DoubleToleranceConstraint(number, _lowPrecisionTolerance));
451
452 testNumber = testFloat;
453 Assert.That(testNumber, new DoubleToleranceConstraint(number + 1.0, _lowPrecisionTolerance));
454
455 testNumber = ++testFloat;
456 Assert.That(testNumber, new DoubleToleranceConstraint(number + 2.0, _lowPrecisionTolerance));
457 }
458 }
459
460 /// <summary>
461 /// Tests the decrement operator.
462 /// </summary>
463 [Test]
464 public void TestDecrementOperator()
465 {
466 LSL_Types.LSLFloat testFloat;
467 double testNumber;
468
469 foreach (double number in m_doubleList)
470 {
471 testFloat = new LSL_Types.LSLFloat(number);
472
473 testNumber = testFloat--;
474 Assert.That(testNumber, new DoubleToleranceConstraint(number, _lowPrecisionTolerance));
475
476 testNumber = testFloat;
477 Assert.That(testNumber, new DoubleToleranceConstraint(number - 1.0, _lowPrecisionTolerance));
478
479 testNumber = --testFloat;
480 Assert.That(testNumber, new DoubleToleranceConstraint(number - 2.0, _lowPrecisionTolerance));
481 }
482 }
483
484 /// <summary>
485 /// Tests LSLFloat.ToString().
486 /// </summary>
487 [Test]
488 public void TestToString()
489 {
490 LSL_Types.LSLFloat testFloat;
491
492 foreach (KeyValuePair<double, string> number in m_doubleStringSet)
493 {
494 testFloat = new LSL_Types.LSLFloat(number.Key);
495 Assert.AreEqual(number.Value, testFloat.ToString());
496 }
497 }
498
499 /// <summary>
500 /// Tests addition of two LSLFloats.
501 /// </summary>
502 [Test]
503 public void TestAddTwoLSLFloats()
504 {
505 LSL_Types.LSLFloat testResult;
506
507 foreach (KeyValuePair<double, double> number in m_doubleDoubleSet)
508 {
509 testResult = new LSL_Types.LSLFloat(number.Key) + new LSL_Types.LSLFloat(number.Value);
510 Assert.That(testResult.value, new DoubleToleranceConstraint(number.Key + number.Value, _lowPrecisionTolerance));
511 }
512 }
513
514 /// <summary>
515 /// Tests subtraction of two LSLFloats.
516 /// </summary>
517 [Test]
518 public void TestSubtractTwoLSLFloats()
519 {
520 LSL_Types.LSLFloat testResult;
521
522 foreach (KeyValuePair<double, double> number in m_doubleDoubleSet)
523 {
524 testResult = new LSL_Types.LSLFloat(number.Key) - new LSL_Types.LSLFloat(number.Value);
525 Assert.That(testResult.value, new DoubleToleranceConstraint(number.Key - number.Value, _lowPrecisionTolerance));
526 }
527 }
528
529 /// <summary>
530 /// Tests multiplication of two LSLFloats.
531 /// </summary>
532 [Test]
533 public void TestMultiplyTwoLSLFloats()
534 {
535 LSL_Types.LSLFloat testResult;
536
537 foreach (KeyValuePair<double, double> number in m_doubleDoubleSet)
538 {
539 testResult = new LSL_Types.LSLFloat(number.Key) * new LSL_Types.LSLFloat(number.Value);
540 Assert.That(testResult.value, new DoubleToleranceConstraint(number.Key * number.Value, _lowPrecisionTolerance));
541 }
542 }
543
544 /// <summary>
545 /// Tests division of two LSLFloats.
546 /// </summary>
547 [Test]
548 public void TestDivideTwoLSLFloats()
549 {
550 LSL_Types.LSLFloat testResult;
551
552 foreach (KeyValuePair<double, double> number in m_doubleDoubleSet)
553 {
554 if (number.Value != 0.0) // Let's avoid divide by zero.
555 {
556 testResult = new LSL_Types.LSLFloat(number.Key) / new LSL_Types.LSLFloat(number.Value);
557 Assert.That(testResult.value, new DoubleToleranceConstraint(number.Key / number.Value, _lowPrecisionTolerance));
558 }
559 }
560 }
561
562 /// <summary>
563 /// Tests boolean correctly cast implicitly to LSLFloat.
564 /// </summary>
565 [Test]
566 public void TestImplicitCastBooleanToLSLFloat()
567 {
568 LSL_Types.LSLFloat testFloat;
569
570 testFloat = (1 == 0);
571 Assert.That(testFloat.value, new DoubleToleranceConstraint(0.0, _lowPrecisionTolerance));
572
573 testFloat = (1 == 1);
574 Assert.That(testFloat.value, new DoubleToleranceConstraint(1.0, _lowPrecisionTolerance));
575
576 testFloat = false;
577 Assert.That(testFloat.value, new DoubleToleranceConstraint(0.0, _lowPrecisionTolerance));
578
579 testFloat = true;
580 Assert.That(testFloat.value, new DoubleToleranceConstraint(1.0, _lowPrecisionTolerance));
581 }
582 }
583}