Commit b39c5fc3 authored by Stephanie Gawroriski's avatar Stephanie Gawroriski
Browse files

Include all of TAC.

parent 7dc71bd3
Manifest-Version: 1.0
result: NoResult
thrown: NoExceptionThrown
secondary-first: int:-573785174
secondary-undo: int:-1430532899
secondary-eeeeffff: int:-4370
......@@ -14,42 +14,12 @@ squirreljme
tags += "testing"
}
// We need to compile a class but not write it to:
// /squirreljme/modules/tac/build/classes/java/main
sourceSets
{
main
{
java
{
exclude "org/testng/internal/annotations/DisabledRetryAnalyzer.java"
exclude "org/testng/annotations/CustomAttribute.java"
exclude "org/testng/annotations/Test.java"
exclude "org/testng/SkipException.java"
}
}
}
dependencies
{
// We have some annotations we need the source for, but we do not want
// these to stay at run-time
compileOnly "org.testng:testng:7.1.0"
api project(":modules:cldc-compact")
api project(":modules:common-vm")
api project(":modules:io")
api project(":modules:meep-midlet")
api project(":modules:tool-manifest-reader")
api project(":modules:tool-manifest-writer")
api project(":modules:collections")
}
jar
{
// These are excluded because they are not needed by the source and are
// part of TestNG
exclude("org/testng/internal/annotations/DisabledRetryAnalyzer.class")
exclude("org/testng/annotations/CustomAttribute.class")
exclude("org/testng/annotations/Test.class")
exclude("org/testng/SkipException.class")
}
......@@ -11,6 +11,12 @@
package net.multiphasicapps.tac;
import cc.squirreljme.runtime.cldc.util.BooleanArrayList;
import cc.squirreljme.runtime.cldc.util.ByteArrayList;
import cc.squirreljme.runtime.cldc.util.CharacterArrayList;
import cc.squirreljme.runtime.cldc.util.CollectionUtils;
import cc.squirreljme.runtime.cldc.util.IntegerArrayList;
import cc.squirreljme.runtime.cldc.util.LongArrayList;
import cc.squirreljme.runtime.cldc.util.ShortArrayList;
import java.util.Arrays;
import java.util.List;
......@@ -287,127 +293,82 @@ public final class DataSerialization
return sb.toString();
}
// Byte array
else if ((__o instanceof byte[]) || __o instanceof Byte[])
// Boxed Number Array
else if ((__o instanceof byte[]) || (__o instanceof Byte[]) ||
(__o instanceof short[]) || (__o instanceof Short[]) ||
(__o instanceof int[]) || (__o instanceof Integer[]) ||
(__o instanceof long[]) || (__o instanceof Long[]) ||
(__o instanceof char[]) || (__o instanceof Character[]))
{
// Convert first
if (__o instanceof Byte[])
// Which wrapper and key is used?
List<? extends Number> list;
String key;
// Boxed character array (since not a number)
if (__o instanceof Character[])
{
Byte[] a = (Byte[])__o;
int n = a.length;
byte[] b = new byte[n];
for (int i = 0; i < n; i++)
{
Byte v = a[i];
b[i] = (v == null ? 0 : v.byteValue());
}
__o = b;
key = "char*";
list = CollectionUtils.asIntegerList(
Arrays.asList((Character[])__o));
}
// Print values
byte[] a = (byte[])__o;
int n = a.length;
StringBuilder sb = new StringBuilder(
String.format("byte[%d]:", n));
for (int i = 0; i < n; i++)
// Determine how these values are accessed
else if (__o instanceof Number[])
{
if (i > 0)
sb.append(",");
sb.append(a[i]);
// These are all the same!
list = Arrays.asList((Number[])__o);
// The key varies
if (__o instanceof Byte[])
key = "byte*";
else if (__o instanceof Short[])
key = "short*";
else if (__o instanceof Integer[])
key = "int*";
else
key = "long*";
}
return sb.toString();
}
// Short array
else if ((__o instanceof short[]) || __o instanceof Short[])
{
// Convert first
if (__o instanceof Short[])
else if (__o instanceof char[])
{
Short[] a = (Short[])__o;
int n = a.length;
short[] b = new short[n];
for (int i = 0; i < n; i++)
{
Short v = a[i];
b[i] = (v == null ? 0 : v.shortValue());
}
__o = b;
key = "char";
list = CollectionUtils.asIntegerList(
new CharacterArrayList((char[])__o));
}
// Print values
short[] a = (short[])__o;
int n = a.length;
StringBuilder sb = new StringBuilder(
String.format("short[%d]:", n));
for (int i = 0; i < n; i++)
else if (__o instanceof byte[])
{
if (i > 0)
sb.append(",");
sb.append(a[i]);
key = "byte";
list = new ByteArrayList((byte[])__o);
}
return sb.toString();
}
// Character array
else if ((__o instanceof char[]) || __o instanceof Character[])
{
// Convert first
if (__o instanceof Character[])
else if (__o instanceof short[])
{
Character[] a = (Character[])__o;
int n = a.length;
char[] b = new char[n];
for (int i = 0; i < n; i++)
{
Character v = a[i];
b[i] = (v == null ? 0 : v.charValue());
}
__o = b;
key = "short";
list = new ShortArrayList((short[])__o);
}
// Print values
char[] a = (char[])__o;
int n = a.length;
StringBuilder sb = new StringBuilder(
String.format("char[%d]:", n));
for (int i = 0; i < n; i++)
else if (__o instanceof int[])
{
if (i > 0)
sb.append(",");
sb.append((int)a[i]);
key = "int";
list = new IntegerArrayList((int[])__o);
}
return sb.toString();
}
// Integer array
else if ((__o instanceof int[]) || __o instanceof Integer[])
{
// Convert first
if (__o instanceof Integer[])
else
{
Integer[] a = (Integer[])__o;
int n = a.length;
int[] b = new int[n];
for (int i = 0; i < n; i++)
{
Integer v = a[i];
b[i] = (v == null ? 0 : v.intValue());
}
__o = b;
key = "long";
list = new LongArrayList((long[])__o);
}
// Print values
int[] a = (int[])__o;
int n = a.length;
int n = list.size();
StringBuilder sb = new StringBuilder(
String.format("int[%d]:", n));
String.format("%s[%d]:", key, n));
for (int i = 0; i < n; i++)
{
if (i > 0)
sb.append(",");
sb.append(a[i]);
Number val = list.get(i);
sb.append((val == null ? "null" : val.longValue()));
}
return sb.toString();
}
......
......@@ -9,6 +9,9 @@
package net.multiphasicapps.tac;
import cc.squirreljme.jvm.manifest.JavaManifest;
import cc.squirreljme.jvm.manifest.JavaManifestAttributes;
import cc.squirreljme.jvm.manifest.JavaManifestKey;
import cc.squirreljme.runtime.cldc.util.SortedTreeMap;
import cc.squirreljme.runtime.cldc.util.SortedTreeSet;
import java.io.IOException;
......@@ -23,9 +26,6 @@ import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import net.multiphasicapps.tool.manifest.JavaManifest;
import net.multiphasicapps.tool.manifest.JavaManifestAttributes;
import net.multiphasicapps.tool.manifest.JavaManifestKey;
import net.multiphasicapps.tool.manifest.writer.MutableJavaManifest;
import net.multiphasicapps.tool.manifest.writer.MutableJavaManifestAttributes;
......
......@@ -10,6 +10,8 @@
package net.multiphasicapps.tac;
import cc.squirreljme.jvm.manifest.JavaManifest;
import cc.squirreljme.jvm.manifest.JavaManifestAttributes;
import cc.squirreljme.jvm.mle.RuntimeShelf;
import cc.squirreljme.jvm.mle.constants.VMType;
import cc.squirreljme.runtime.cldc.debug.Debugging;
......@@ -19,8 +21,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.multiphasicapps.tool.manifest.JavaManifest;
import net.multiphasicapps.tool.manifest.JavaManifestAttributes;
import org.testng.SkipException;
import org.testng.annotations.Test;
......@@ -234,6 +234,126 @@ abstract class __CoreTest__
this._runResult.putSecondaryValue(__key, __v);
}
/**
* Stores a secondary value which can be additionally used as test
* comparison.
*
* @param __key The key to check.
* @param __v The value to check.
* @throws NullPointerException If no key was specified.
* @since 2021/06/16
*/
public final void secondary(String __key, boolean __v)
throws NullPointerException
{
this.secondary(__key, (Object)__v);
}
/**
* Stores a secondary value which can be additionally used as test
* comparison.
*
* @param __key The key to check.
* @param __v The value to check.
* @throws NullPointerException If no key was specified.
* @since 2021/06/17
*/
public final void secondary(String __key, byte __v)
throws NullPointerException
{
this.secondary(__key, (Object)__v);
}
/**
* Stores a secondary value which can be additionally used as test
* comparison.
*
* @param __key The key to check.
* @param __v The value to check.
* @throws NullPointerException If no key was specified.
* @since 2021/06/17
*/
public final void secondary(String __key, short __v)
throws NullPointerException
{
this.secondary(__key, (Object)__v);
}
/**
* Stores a secondary value which can be additionally used as test
* comparison.
*
* @param __key The key to check.
* @param __v The value to check.
* @throws NullPointerException If no key was specified.
* @since 2021/06/17
*/
public final void secondary(String __key, char __v)
throws NullPointerException
{
this.secondary(__key, (Object)__v);
}
/**
* Stores a secondary value which can be additionally used as test
* comparison.
*
* @param __key The key to check.
* @param __v The value to check.
* @throws NullPointerException If no key was specified.
* @since 2021/06/16
*/
public final void secondary(String __key, int __v)
throws NullPointerException
{
this.secondary(__key, (Object)__v);
}
/**
* Stores a secondary value which can be additionally used as test
* comparison.
*
* @param __key The key to check.
* @param __v The value to check.
* @throws NullPointerException If no key was specified.
* @since 2021/06/16
*/
public final void secondary(String __key, long __v)
throws NullPointerException
{
this.secondary(__key, (Object)__v);
}
/**
* Stores a secondary value which can be additionally used as test
* comparison.
*
* @param __key The key to check.
* @param __v The value to check.
* @throws NullPointerException If no key was specified.
* @since 2021/06/16
*/
public final void secondary(String __key, float __v)
throws NullPointerException
{
this.secondary(__key, (Object)__v);
}
/**
* Stores a secondary value which can be additionally used as test
* comparison.
*
* @param __key The key to check.
* @param __v The value to check.
* @throws NullPointerException If no key was specified.
* @since 2021/06/16
*/
public final void secondary(String __key, double __v)
throws NullPointerException
{
this.secondary(__key, (Object)__v);
}
/**
* Parses the input file for main program arguments, these are passed
* directly into the test.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment