2525import net .jqwik .api .ForAll ;
2626import net .jqwik .api .Property ;
2727import net .jqwik .api .Provide ;
28- import net .jqwik .api .constraints .Size ;
2928import org .junit .jupiter .api .Test ;
3029import org .junit .jupiter .api .io .TempDir ;
3130
@@ -418,13 +417,11 @@ void prop_dictUtf8_unicode_roundTripsViaRust(
418417 }
419418 }
420419
421- /// I64 column: arbitrary longs survive Java write → Rust JNI read.
422- @ Property (tries = 20 )
423- void prop_i64_roundTripsViaRust (
424- @ ForAll @ Size (min = 1 , max = 500 ) List <Long > values ) throws IOException {
420+ /// I64 column: full Long range (MIN_VALUE, MAX_VALUE, negatives), empty and large arrays.
421+ @ Property (tries = 30 )
422+ void prop_i64_roundTripsViaRust (@ ForAll ("i64Arrays" ) long [] data ) throws IOException {
425423 Path tmp = Files .createTempDirectory ("vortex-pbt-i64" );
426424 try {
427- long [] data = values .stream ().mapToLong (Long ::longValue ).toArray ();
428425 Path file = tmp .resolve ("pbt_i64.vtx" );
429426 try (var ch = FileChannel .open (file , StandardOpenOption .CREATE , StandardOpenOption .WRITE );
430427 var sut = VortexWriter .create (ch , TS_SCHEMA , WriteOptions .defaults ())) {
@@ -441,30 +438,37 @@ void prop_i64_roundTripsViaRust(
441438 Arbitrary <String []> asciiStringArrays () {
442439 Arbitrary <String > strings = Arbitraries .strings ()
443440 .alpha ()
444- .ofMinLength (0 ).ofMaxLength (20 );
445- return strings .array (String [].class ).ofMinSize (1 ).ofMaxSize (200 );
441+ .ofMinLength (0 ).ofMaxLength (100 );
442+ return strings .array (String [].class ).ofMinSize (0 ).ofMaxSize (5_000 );
446443 }
447444
448445 @ Provide
449446 Arbitrary <String []> u16DictStringArrays () {
450- // 257 unique strings guaranteed by @UniqueElements on a list, then a suffix of repeats
447+ // 257–5000 unique strings → U16 codes territory
451448 Arbitrary <String > strings = Arbitraries .strings ()
452449 .alpha ()
453- .ofMinLength (3 ).ofMaxLength (12 );
454- return strings .list ().ofMinSize (257 ).ofMaxSize (300 )
455- .map (list -> list .stream ().distinct ().limit ( 300 ). toArray (String []::new ))
450+ .ofMinLength (3 ).ofMaxLength (20 );
451+ return strings .list ().ofMinSize (257 ).ofMaxSize (5_000 )
452+ .map (list -> list .stream ().distinct ().toArray (String []::new ))
456453 .filter (arr -> arr .length >= 257 );
457454 }
458455
459456 @ Provide
460457 Arbitrary <String []> unicodeStringArrays () {
461458 Arbitrary <String > strings = Arbitraries .strings ()
462- .withCharRange ('' , '' )
463- .ofMinLength (1 ).ofMaxLength (10 );
464- return strings .array (String [].class ).ofMinSize (1 ).ofMaxSize (100 );
459+ .withCharRange ('\u4E00' , '\uD7FF' )
460+ .ofMinLength (0 ).ofMaxLength (50 );
461+ return strings .array (String [].class ).ofMinSize (0 ).ofMaxSize (1_000 );
462+ }
463+
464+ @ Provide
465+ Arbitrary <long []> i64Arrays () {
466+ return Arbitraries .longs ()
467+ .array (long [].class )
468+ .ofMinSize (0 ).ofMaxSize (10_000 );
465469 }
466470
467- private static void deleteDir (Path dir ) throws IOException {
471+ private static void deleteDir (Path dir ) throws IOException {
468472 try (var walk = Files .walk (dir )) {
469473 walk .sorted (Comparator .reverseOrder ()).forEach (p -> p .toFile ().delete ());
470474 }
0 commit comments