aboutsummaryrefslogtreecommitdiffstats
path: root/vespajlib/src/test/java
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@verizonmedia.com>2019-04-03 21:30:28 +0200
committerJon Bratseth <bratseth@verizonmedia.com>2019-04-03 21:30:28 +0200
commit5792d3a23890edaa5d32b0f6bfc726c3e9956f3a (patch)
tree2b65d4f48b92bf7ec846b3efd5d5259244bc234a /vespajlib/src/test/java
parent6eb80166172e10255841fd3d3cf70bed09d3d8c1 (diff)
Add tensor value type
Diffstat (limited to 'vespajlib/src/test/java')
-rw-r--r--vespajlib/src/test/java/com/yahoo/geo/BoundingBoxParserTestCase.java10
-rw-r--r--vespajlib/src/test/java/com/yahoo/slime/BinaryFormatTestCase.java38
2 files changed, 11 insertions, 37 deletions
diff --git a/vespajlib/src/test/java/com/yahoo/geo/BoundingBoxParserTestCase.java b/vespajlib/src/test/java/com/yahoo/geo/BoundingBoxParserTestCase.java
index 9602bdb8d94..f6fed9d33ed 100644
--- a/vespajlib/src/test/java/com/yahoo/geo/BoundingBoxParserTestCase.java
+++ b/vespajlib/src/test/java/com/yahoo/geo/BoundingBoxParserTestCase.java
@@ -69,16 +69,6 @@ public class BoundingBoxParserTestCase {
all1234(parser);
}
- /**
- * Tests various legal inputs and print the output
- */
- @Test
- public void testPrint() {
- String here = "n=63.418417 E=10.433033 S=37.7 W=-122.02";
- parser = new BoundingBoxParser(here);
- System.out.println(here+" -> "+parser);
- }
-
@Test
public void testGeoPlanetExample() {
/* example XML:
diff --git a/vespajlib/src/test/java/com/yahoo/slime/BinaryFormatTestCase.java b/vespajlib/src/test/java/com/yahoo/slime/BinaryFormatTestCase.java
index e8ceab44c78..7cf4bddaa01 100644
--- a/vespajlib/src/test/java/com/yahoo/slime/BinaryFormatTestCase.java
+++ b/vespajlib/src/test/java/com/yahoo/slime/BinaryFormatTestCase.java
@@ -57,7 +57,6 @@ public class BinaryFormatTestCase {
@Test
public void testZigZagConversion() {
- System.out.println("test zigzag conversion");
assertThat(encode_zigzag(0), is((long)0));
assertThat(decode_zigzag(encode_zigzag(0)), is(0L));
@@ -88,7 +87,6 @@ public class BinaryFormatTestCase {
@Test
public void testDoubleConversion() {
- System.out.println("test double conversion");
assertThat(encode_double(0.0), is(0L));
assertThat(decode_double(encode_double(0.0)), is(0.0));
@@ -116,7 +114,6 @@ public class BinaryFormatTestCase {
@Test
public void testTypeAndMetaMangling() {
- System.out.println("test type and meta mangling");
for (byte type = 0; type < TYPE_LIMIT; ++type) {
for (int meta = 0; meta < META_LIMIT; ++meta) {
byte mangled = encode_type_and_meta(type, meta);
@@ -126,10 +123,8 @@ public class BinaryFormatTestCase {
}
}
- // was testCmprUlong
@Test
- public void testCmprLong() {
- System.out.println("test compressed long");
+ public void testCompressedLong() {
{
long value = 0;
byte[] wanted = { 0 };
@@ -217,11 +212,8 @@ public class BinaryFormatTestCase {
// testWriteBytes -> buffered IO test
// testReadByte -> buffered IO test
// testReadBytes -> buffered IO test
-
@Test
- public void testTypeAndSize() {
- System.out.println("test type and size conversion");
-
+ public void testTypeAndSizeConversion() {
for (byte type = 0; type < TYPE_LIMIT; ++type) {
for (long size = 0; size < 500; ++size) {
BufferedOutput expect = new BufferedOutput();
@@ -271,8 +263,7 @@ public class BinaryFormatTestCase {
}
@Test
- public void testTypeAndBytes() {
- System.out.println("test encoding and decoding of type and bytes");
+ public void testEncodingAndDecodingOfTypeAndBytes() {
for (byte type = 0; type < TYPE_LIMIT; ++type) {
for (int n = 0; n < MAX_NUM_SIZE; ++n) {
for (int pre = 0; (pre == 0) || (pre < n); ++pre) {
@@ -307,9 +298,7 @@ public class BinaryFormatTestCase {
}
@Test
- public void testEmpty() {
- System.out.println("test encoding empty slime");
-
+ public void testEncodingEmptySlime() {
Slime slime = new Slime();
BufferedOutput expect = new BufferedOutput();
expect.put((byte)0); // num symbols
@@ -321,8 +310,7 @@ public class BinaryFormatTestCase {
}
@Test
- public void testBasic() {
- System.out.println("test encoding slime holding a single basic value");
+ public void testEncodingSlimeHoldingASingleBasicValue() {
{
Slime slime = new Slime();
slime.setBool(false);
@@ -427,8 +415,7 @@ public class BinaryFormatTestCase {
}
@Test
- public void testArray() {
- System.out.println("test encoding slime holding an array of various basic values");
+ public void testEncodingSlimeArray() {
Slime slime = new Slime();
Cursor c = slime.setArray();
byte[] data = { 'd', 'a', 't', 'a' };
@@ -452,8 +439,7 @@ public class BinaryFormatTestCase {
}
@Test
- public void testObject() {
- System.out.println("test encoding slime holding an object of various basic values");
+ public void testEncodingSlimeObject() {
Slime slime = new Slime();
Cursor c = slime.setObject();
byte[] data = { 'd', 'a', 't', 'a' };
@@ -478,8 +464,7 @@ public class BinaryFormatTestCase {
}
@Test
- public void testNesting() {
- System.out.println("test encoding slime holding a more complex structure");
+ public void testEncodingComplexSlimeStructure() {
Slime slime = new Slime();
Cursor c1 = slime.setObject();
c1.setLong("bar", 10);
@@ -503,8 +488,7 @@ public class BinaryFormatTestCase {
}
@Test
- public void testSymbolReuse() {
- System.out.println("test encoding slime reusing symbols");
+ public void testEncodingSlimeReusingSymbols() {
Slime slime = new Slime();
Cursor c1 = slime.setArray();
{
@@ -533,8 +517,7 @@ public class BinaryFormatTestCase {
}
@Test
- public void testOptionalDecodeOrder() {
- System.out.println("test decoding slime with different symbol order");
+ public void testDecodingSlimeWithDifferentSymbolOrder() {
byte[] data = {
5, // num symbols
1, 'd', 1, 'e', 1, 'f', 1, 'b', 1, 'c', // symbol table
@@ -564,4 +547,5 @@ public class BinaryFormatTestCase {
assertThat(c.field("f").asData(), is(expd));
assertThat(c.entry(5).valid(), is(false)); // not ARRAY
}
+
}