On Tue, 7 May 2024 19:25:53 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

>> They just read the `os.name` with `System.getProperty("os.name") but that 
>> only includes the Standard values.
>> https://github.com/junit-team/junit5/blob/db47616ab4ccf38ff63e8bff41050d5102c9ff15/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/OS.java#L110
>>  
>> 
>> This only includes the standard OS values. However,  an alternative could be 
>> to use  `@EnabledIf("isWindows")` with a method of that name that returns a 
>> boolean 
>> 
>> 
>> boolean isWindows() {
>> return PlatformUtil.isWindows()
>> }
>
> the logic **is** different, but both variants should be ok for testing 
> purposes.
> 
> for example,
> junit: mac = toLowercase(ENGLISH).contains("mac")
> jfx: mac = startsWith("Mac")

I prefer to stick with assumptions since that's what we use everywhere else. 
Also, it gives us more control.

So while we _could_ do something else in the future, this PR isn't the place to 
do it.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1442#discussion_r1592978053

Reply via email to