Skip to content

Commit 3806d63

Browse files
committed
[test] Wrote testing class for cluster map
1 parent dbf4a8c commit 3806d63

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright (C) 2018 Muhammad Tayyab Akram
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.mta.tehreer.internal.layout;
18+
19+
import com.mta.tehreer.collections.IntListTestSuite;
20+
21+
import org.junit.Before;
22+
23+
public class ClusterMapTest extends IntListTestSuite {
24+
@Before
25+
public void setUp() {
26+
int[] sample = new int[] {
27+
0x0000FFFF, 0x1C72AAA9, 0x38E45553, 0x5555FFFD, 0x71C7AAA7,
28+
0x8E395551, 0xAAAAFFFB, 0xC71CAAA5, 0xE38E554F, 0xFFFFFFF9
29+
};
30+
int difference = 0xFFFF;
31+
32+
this.expected = new int[] {
33+
0x00000000, 0x1C71AAAA, 0x38E35554, 0x5554FFFE, 0x71C6AAA8,
34+
0x8E385552, 0xAAA9FFFC, 0xC71BAAA6, 0xE38D5550, 0xFFFEFFFA
35+
};
36+
this.actual = new ClusterMap(sample, 0, sample.length, difference);
37+
}
38+
}

0 commit comments

Comments
 (0)