Line | |
---|
1 | import unittest
|
---|
2 | from tudelft.utilities.immutablelist.FixedList import FixedList
|
---|
3 |
|
---|
4 | class FixedListTest (unittest.TestCase) :
|
---|
5 | #abString = "{\"list\":[\"a\",\"b\"]}"
|
---|
6 | values = ("a", "b")
|
---|
7 | listStr = FixedList(values)
|
---|
8 |
|
---|
9 | valuesFloats = [2., 3.]
|
---|
10 | listFloats = FixedList(valuesFloats)
|
---|
11 | listFloats1 = FixedList(valuesFloats)
|
---|
12 | #loatsString = "{\"list\":[[\"java.lang.Float\",2.0],[\"java.lang.Float\",3.0]]}";
|
---|
13 |
|
---|
14 | floatsList = [ 3., 4. ]
|
---|
15 |
|
---|
16 |
|
---|
17 | def testEqual(self):
|
---|
18 | self.assertNotEqual(self.listStr, self.listFloats)
|
---|
19 | self.assertNotEqual(hash(self.listStr), hash(self.listFloats))
|
---|
20 |
|
---|
21 | self.assertEqual(self.listFloats, self.listFloats1)
|
---|
22 | self.assertEqual(hash(self.listFloats), hash(self.listFloats1))
|
---|
23 | |
---|
Note:
See
TracBrowser
for help on using the repository browser.