public class Tests extends Object
Copyright (c) 2019-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
Tests.Compound
Class used to test serialization of classes that implement SerializableObject.
|
| Constructor and Description |
|---|
Tests() |
| Modifier and Type | Method and Description |
|---|---|
(package private) static boolean |
deepEquals0(Object e1,
Object e2)
Compare two arrays of any type (stolen from java.util.Arrays).
|
(package private) static Object |
makePrimitive(Object in)
Convert an array, or matrix of Byte, Short, Integer, etc.
|
void |
pointerTest()
Test the Pointer class.
|
void |
serializationExceptionTest()
Test all constructors for SerializationException.
|
void |
simpleTests()
Basic test encoding and decoding of the basic types.
|
void |
testArrayOfDjutilsVectors()
Test serialization and deserialization of arrays of Djutils vectors.
|
void |
testArrays()
Test encoding and decoding of arrays.
|
void |
testBasicSerializer()
Test the toString and dataClassName methods of the BasicSerializer.
|
void |
testCompoundArrays()
Test the compound array encoder and decoder.
|
void |
testDJunits()
Test encoding and decoding of strongly typed quantities (DJUNITS).
|
void |
testEndianUtil()
Test the remainder of the EndianUtil class.
|
void |
testJaggedMatrices()
Test that jagged matrices are detected and cause a SerializationException.
|
void |
testMatrices()
Test encoding and decoding of arrays.
|
void |
testStrings()
Test encoding and decoding of Strings with more exotic characters for UTF-8 and UTF-16.
|
void |
testUnhandledObject()
Test that the encoder throws a SerializationException when given something that it does not know how to serialize.
|
void |
testUnitType()
Test the UnitType class.
|
public void simpleTests()
throws org.djutils.serialization.SerializationException
SerializationException - when that happens uncaught this test has failedpublic void testStrings()
throws org.djutils.serialization.SerializationException,
UnsupportedEncodingException
SerializationException - when that happens uncaught this test has failedUnsupportedEncodingException - when UTF-8 en/decoding failspublic void testArrays()
throws org.djutils.serialization.SerializationException
SerializationException - when that happens uncaught this test has failedpublic void testMatrices()
throws org.djutils.serialization.SerializationException
SerializationException - when that happens uncaught this test has failedpublic void testDJunits()
throws org.djutils.serialization.SerializationException,
org.djunits.value.ValueException
SerializationException - when that happens uncaught, this test has failedorg.djunits.value.ValueException - when that happens uncaught, this test has failedpublic void testCompoundArrays()
throws org.djutils.serialization.SerializationException
SerializationException - when that happens uncaught, this test has failedpublic void testArrayOfDjutilsVectors()
throws org.djunits.value.ValueException,
org.djutils.serialization.SerializationException
org.djunits.value.ValueException - if that happens uncaught; this test has failedSerializationException - if that happens uncaught; this test has failedpublic void testJaggedMatrices()
public void testUnhandledObject()
public void pointerTest()
static Object makePrimitive(Object in)
in - Object; the array to convertstatic boolean deepEquals0(Object e1, Object e2)
e1 - Object (should be some kind of array)e2 - Object (should be some kind of array)public void testUnitType()
public final void serializationExceptionTest()
public void testEndianUtil()
public void testBasicSerializer()
Copyright © 2018–2019 Delft University of Technology. All rights reserved.