[vector] tests with data providers
Halimi, Jean-Philippe
jean-philippe.halimi at intel.com
Mon Mar 12 16:04:50 UTC 2018
Hi Paul,
Thanks for the fast follow-up patch! :-)
I like the new design a lot. I have to admit I am a bit confused on the data initializer part:
- Where is BOOLEAN_GENERATOR_PAIRS defined?
- I am having trouble understanding how initializer functions defined in BYTE_GENERATORS are selected.
For instance, in this code:
+ // Create combinations of pairs
+ // @@@ Might be sensitive to order e.g. div by 0
+ static final List<List<IntFunction<byte[]>>> BYTE_GENERATOR_PAIRS =
+ Stream.of(BYTE_GENERATORS.get(0)).
+ flatMap(fa -> BYTE_GENERATORS.stream().skip(1).map(fb -> List.of(fa, fb))).
+ collect(Collectors.toList());
Could you elaborate how this code selects the appropriate method?
Jp
-----Original Message-----
From: panama-dev [mailto:panama-dev-bounces at openjdk.java.net] On Behalf Of Paul Sandoz
Sent: Friday, March 9, 2018 5:12 PM
To: panama-dev at openjdk.java.net
Subject: [vector] tests with data providers
Hi,
Please review this patch to covert the vector tests to use TestNG data providers:
http://cr.openjdk.java.net/~psandoz/panama/tests-with-data-providers/webrev/ <http://cr.openjdk.java.net/~psandoz/panama/tests-with-data-providers/webrev/>
For now i took the simplest route placing them in the concrete tests rather than in a super class for a type shared across the shapes (in effect much in the header.template can be moved over to such a super class).
Paul.
More information about the panama-dev
mailing list