1 /*******************************************************************************
2 * Copyright (c) 2016 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *******************************************************************************/
10 package org
.eclipse
.tracecompass
.segmentstore
.core
.tests
;
12 import static org
.junit
.Assert
.assertEquals
;
13 import static org
.junit
.Assert
.assertFalse
;
15 import java
.util
.Arrays
;
17 import org
.eclipse
.jdt
.annotation
.NonNull
;
18 import org
.eclipse
.tracecompass
.segmentstore
.core
.BasicSegment
;
19 import org
.eclipse
.tracecompass
.segmentstore
.core
.ISegment
;
20 import org
.eclipse
.tracecompass
.segmentstore
.core
.ISegmentStore
;
21 import org
.eclipse
.tracecompass
.segmentstore
.core
.treemap
.TreeMapStore
;
22 import org
.junit
.Test
;
25 * Unit tests for intersecting elements in a TreeMapStore
27 * @author France Lapointe Nguyen
28 * @deprecated the test is deprecated as the store is deprecated
31 public class OldTreeMapStoreTest
extends AbstractTestSegmentStore
{
34 protected ISegmentStore
<@NonNull ISegment
> getSegmentStore() {
35 return new TreeMapStore
<>();
39 protected ISegmentStore
<@NonNull ISegment
> getSegmentStore(@NonNull ISegment
@NonNull [] data
) {
40 TreeMapStore
<@NonNull ISegment
> treeMapStore
= new TreeMapStore
<>();
41 treeMapStore
.addAll(Arrays
.asList(data
));
46 * Try adding duplicate elements, they should be ignored
49 public void testNoDuplicateElements() {
50 for (ISegment segment
: SEGMENTS
) {
51 boolean ret
= fSegmentStore
.add(new BasicSegment(segment
.getStart(), segment
.getEnd()));
54 assertEquals(SEGMENTS
.size(), fSegmentStore
.size());
This page took 0.031651 seconds and 5 git commands to generate.