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

Tobias Hartmann tobias.hartmann at oracle.com
Thu Jul 6 14:09:14 UTC 2017


On 06.07.2017 16:03, Maurizio Cimadamore wrote:
> 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
> 
> ===============================================
> valhalla/mvt/vector/VectorTest.java
> 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.)

You are right, it seems more reasonable to use testng in this case.

Thanks,
Tobias

>> 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