RFR 8183938: [MVT] Add test for mock vector API

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Thu Jul 6 14:03:28 UTC 2017

On 06/07/17 14:51, Tobias Hartmann wrote:
> On 06.07.2017 15:48, Maurizio Cimadamore wrote:
>> Not really, that's something that came from before your fix of JDK-8183129 now it can be safely removed if preferred.
>> I will also remove -Xint flag from the test that I've already pushed.
> Okay, thanks! I think it would be best to have one run with -Xint and one with -Xcomp.
> Is there a reason you are using testng instead of a normal jtreg test?
testng makes it easier to add new test cases as you go along - with 
plain jtreg you really only have a main method. It is also easier to 
create things like data providers - e.g. create a bunch of objects and 
execute a given test method against each possible object in the data 
set. In other words, testng is typically more suited for writing unit 
tests, and the test report will be generally more useful e.g :

test VectorTest.testConditional(): success
test VectorTest.testSumArray(1): success
test VectorTest.testSumArray(5): success
test VectorTest.testSumArray(10): success
test VectorTest.testSumArray(0): success

Total tests run: 5, Failures: 0, Skips: 0

You can of course do all this with jtreg, but you have to do it 
manually, with the risk of replicating routines across multiple tests 
(e.g. assertEquals, etc.)


> Best regards,
> Tobias
>> On 06/07/17 14:40, Tobias Hartmann wrote:
>>> Hi Maurizio,
>>> is there a reason that the test is only executed with -Xint?
>>> Thanks,
>>> Tobias
>>> On 06.07.2017 15:28, Maurizio Cimadamore wrote:
>>>> Hi,
>>>> this changeset adds the mock vector API test that Vlad has worked on. I cleaned it up a bit and converted to a working testng test.
>>>> http://cr.openjdk.java.net/~mcimadamore/8183938/
>>>> Cheers
>>>> Maurizio

More information about the valhalla-dev mailing list