Skip to content

Commit 41b7cc3

Browse files
committed
test: move test helpers under io.github.dfa1.vortex.core.*
DTypes, TestSegments, and ProtoRuntimeTest lived under io.github.dfa1.vortex.encoding / io.github.dfa1.vortex.proto, outside the documented core.* module map. Move them to io.github.dfa1.vortex.core.testing / io.github.dfa1.vortex.core.proto and repoint every reader/writer test's imports. Delete EncodeTestHelper and TestRegistry, empty placeholder stubs left behind when their real implementations moved to writer/test and reader/test.
1 parent cde6e94 commit 41b7cc3

61 files changed

Lines changed: 87 additions & 103 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

core/src/test/java/io/github/dfa1/vortex/proto/ProtoRuntimeTest.java renamed to core/src/test/java/io/github/dfa1/vortex/core/proto/ProtoRuntimeTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void roundTripsVarint64(long value) throws IOException {
3333
}
3434

3535
@Test
36-
void varintCanonicalEncodingOf150() throws IOException {
36+
void varintCanonicalEncodingOf150() {
3737
// Given — proto3 spec example: 150 encodes as 0x96 0x01.
3838
ProtoWriter w = new ProtoWriter();
3939
w.writeVarint64(150L);
@@ -334,7 +334,7 @@ void recordsWithDifferentByteArraysAreNotEqual() {
334334
class Backpatch {
335335

336336
@Test
337-
void shortPayloadCompactsLengthVarint() throws IOException {
337+
void shortPayloadCompactsLengthVarint() {
338338
// Given — payload of 3 bytes fits in 1-byte varint length.
339339
// beginLenDelim reserves 5 bytes; endLenDelim shifts the payload left by 4.
340340
ProtoWriter w = new ProtoWriter();
@@ -352,7 +352,7 @@ void shortPayloadCompactsLengthVarint() throws IOException {
352352
}
353353

354354
@Test
355-
void backpatchedMatchesLegacyEmbeddedPattern() throws IOException {
355+
void backpatchedMatchesLegacyEmbeddedPattern() {
356356
// Given — same packed varint payload via backpatch vs. the legacy
357357
// "temp ProtoWriter + writeEmbedded" pattern. Output bytes must match exactly,
358358
// proving the backpatch refactor is wire-compatible.

core/src/test/java/io/github/dfa1/vortex/encoding/DTypes.java renamed to core/src/test/java/io/github/dfa1/vortex/core/testing/DTypes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.github.dfa1.vortex.encoding;
1+
package io.github.dfa1.vortex.core.testing;
22

33
import io.github.dfa1.vortex.core.model.DType;
44
import io.github.dfa1.vortex.core.model.PType;

core/src/test/java/io/github/dfa1/vortex/encoding/TestSegments.java renamed to core/src/test/java/io/github/dfa1/vortex/core/testing/TestSegments.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.github.dfa1.vortex.encoding;
1+
package io.github.dfa1.vortex.core.testing;
22

33
import io.github.dfa1.vortex.core.io.VortexFormat;
44

core/src/test/java/io/github/dfa1/vortex/encoding/EncodeTestHelper.java

Lines changed: 0 additions & 8 deletions
This file was deleted.

core/src/test/java/io/github/dfa1/vortex/encoding/TestRegistry.java

Lines changed: 0 additions & 8 deletions
This file was deleted.

reader/src/test/java/io/github/dfa1/vortex/reader/ReadRegistryTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import io.github.dfa1.vortex.core.error.VortexException;
44
import io.github.dfa1.vortex.reader.array.Array;
55
import io.github.dfa1.vortex.reader.array.UnknownArray;
6-
import io.github.dfa1.vortex.encoding.DTypes;
6+
import io.github.dfa1.vortex.core.testing.DTypes;
77
import io.github.dfa1.vortex.core.model.EncodingId;
88
import io.github.dfa1.vortex.reader.decode.ArrayNode;
99
import io.github.dfa1.vortex.reader.decode.DecodeContext;

reader/src/test/java/io/github/dfa1/vortex/reader/array/ArrayLimitedTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
import java.lang.foreign.MemorySegment;
1111
import java.util.List;
1212

13-
import static io.github.dfa1.vortex.encoding.DTypes.BOOL;
14-
import static io.github.dfa1.vortex.encoding.DTypes.F32;
15-
import static io.github.dfa1.vortex.encoding.DTypes.F64;
16-
import static io.github.dfa1.vortex.encoding.DTypes.I16;
17-
import static io.github.dfa1.vortex.encoding.DTypes.I32;
18-
import static io.github.dfa1.vortex.encoding.DTypes.I64;
19-
import static io.github.dfa1.vortex.encoding.DTypes.I8;
13+
import static io.github.dfa1.vortex.core.testing.DTypes.BOOL;
14+
import static io.github.dfa1.vortex.core.testing.DTypes.F32;
15+
import static io.github.dfa1.vortex.core.testing.DTypes.F64;
16+
import static io.github.dfa1.vortex.core.testing.DTypes.I16;
17+
import static io.github.dfa1.vortex.core.testing.DTypes.I32;
18+
import static io.github.dfa1.vortex.core.testing.DTypes.I64;
19+
import static io.github.dfa1.vortex.core.testing.DTypes.I8;
2020
import static io.github.dfa1.vortex.reader.array.TestArrays.bools;
2121
import static io.github.dfa1.vortex.reader.array.TestArrays.bytes;
2222
import static io.github.dfa1.vortex.reader.array.TestArrays.doubles;

reader/src/test/java/io/github/dfa1/vortex/reader/array/ArrayMaterializeTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
import java.math.BigDecimal;
1515
import java.util.List;
1616

17-
import static io.github.dfa1.vortex.encoding.DTypes.F64;
18-
import static io.github.dfa1.vortex.encoding.DTypes.I64;
17+
import static io.github.dfa1.vortex.core.testing.DTypes.F64;
18+
import static io.github.dfa1.vortex.core.testing.DTypes.I64;
1919
import static io.github.dfa1.vortex.reader.array.TestArrays.bools;
2020
import static io.github.dfa1.vortex.reader.array.TestArrays.bytes;
2121
import static io.github.dfa1.vortex.reader.array.TestArrays.doubles;

reader/src/test/java/io/github/dfa1/vortex/reader/array/ChunkedRecordSmokeTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
import java.util.ArrayList;
1111
import java.util.List;
1212

13-
import static io.github.dfa1.vortex.encoding.DTypes.BOOL;
14-
import static io.github.dfa1.vortex.encoding.DTypes.F32;
15-
import static io.github.dfa1.vortex.encoding.DTypes.F64;
16-
import static io.github.dfa1.vortex.encoding.DTypes.I16;
17-
import static io.github.dfa1.vortex.encoding.DTypes.I32;
18-
import static io.github.dfa1.vortex.encoding.DTypes.I64;
19-
import static io.github.dfa1.vortex.encoding.DTypes.I8;
13+
import static io.github.dfa1.vortex.core.testing.DTypes.BOOL;
14+
import static io.github.dfa1.vortex.core.testing.DTypes.F32;
15+
import static io.github.dfa1.vortex.core.testing.DTypes.F64;
16+
import static io.github.dfa1.vortex.core.testing.DTypes.I16;
17+
import static io.github.dfa1.vortex.core.testing.DTypes.I32;
18+
import static io.github.dfa1.vortex.core.testing.DTypes.I64;
19+
import static io.github.dfa1.vortex.core.testing.DTypes.I8;
2020
import static io.github.dfa1.vortex.reader.array.TestArrays.bools;
2121
import static io.github.dfa1.vortex.reader.array.TestArrays.bytes;
2222
import static io.github.dfa1.vortex.reader.array.TestArrays.doubles;

reader/src/test/java/io/github/dfa1/vortex/reader/array/DateTimePartsArraysTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package io.github.dfa1.vortex.reader.array;
22

33
import io.github.dfa1.vortex.core.error.VortexException;
4-
import io.github.dfa1.vortex.encoding.DTypes;
4+
import io.github.dfa1.vortex.core.testing.DTypes;
55
import org.junit.jupiter.api.Test;
66

77
import java.lang.foreign.Arena;

0 commit comments

Comments
 (0)