1 /*******************************************************************************
2 * Copyright (c) 2016 École Polytechnique de Montréal
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
.statesystem
.core
.tests
.statevalue
;
12 import static org
.junit
.Assert
.assertEquals
;
14 import org
.eclipse
.tracecompass
.statesystem
.core
.statevalue
.ITmfStateValue
;
15 import org
.eclipse
.tracecompass
.statesystem
.core
.statevalue
.ITmfStateValue
.Type
;
16 import org
.eclipse
.tracecompass
.statesystem
.core
.statevalue
.TmfStateValue
;
17 import org
.junit
.Test
;
20 * Test the integer state value class
22 * @author Geneviève Bastien
24 public class IntStateValueTest
extends StateValueTestBase
{
26 private static final int UNBOXED_VALUE
= 34;
27 private static final TmfStateValue STATE_VALUE
= TmfStateValue
.newValueInt(UNBOXED_VALUE
);
31 protected ITmfStateValue
getStateValueFixture() {
36 protected Type
getStateValueType() {
37 return ITmfStateValue
.Type
.INTEGER
;
42 public void testUnboxInt() {
43 int unboxed
= STATE_VALUE
.unboxInt();
44 assertEquals(UNBOXED_VALUE
, unboxed
);
49 public void testUnboxLong() {
50 long unboxed
= STATE_VALUE
.unboxLong();
51 assertEquals(UNBOXED_VALUE
, unboxed
);