Package org.djunits.vecmat.storage
Class FloatSparseValueTest
java.lang.Object
org.djunits.vecmat.storage.FloatSparseValueTest
Tests for
FloatSparseValue.
Covers all constructors, SI conversion, null checks, negative index errors, accessors, and basic toString() semantics. The tests validate functional correctness; if the implementation contains errors, the tests must fail. Copyright (c) 2025-2026 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://djunits.org. The DJUNITS project is distributed under a three-clause BSD-style license.
- Author:
- Alexander Verbraeck (specifications); Test implementation by Copilot.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidTest constructor(row,col,Q) including SI-conversion and null-check.voidTest constructor(row,col,si) and negative index detection.voidTest constructor(row,col,valueInUnit,unit) including conversion to SI.voidTest that toString() contains all relevant fields.
-
Constructor Details
-
FloatSparseValueTest
public FloatSparseValueTest()
-
-
Method Details
-
testCtorQuantity
@Test @DisplayName("ctor(row,col,Q): null check + SI conversion + negative indices") public void testCtorQuantity()Test constructor(row,col,Q) including SI-conversion and null-check. -
testCtorValueUnit
@Test @DisplayName("ctor(row,col,valueInUnit,unit): conversion to SI") public void testCtorValueUnit()Test constructor(row,col,valueInUnit,unit) including conversion to SI. -
testCtorSI
@Test @DisplayName("ctor(row,col,si): SI direct + negative index checks") public void testCtorSI()Test constructor(row,col,si) and negative index detection. -
testToString
@Test @DisplayName("toString(): contains row/column/value") public void testToString()Test that toString() contains all relevant fields.
-