On Tue, 7 May 2024 19:13:02 GMT, Christoph <d...@openjdk.org> wrote:

>>> EnabledOnOs
>> 
>> thank you @Siedlerchr for this info.
>> I wonder what criteria are set for determining the OS value, and do they 
>> match jfx ones?
>
> 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")

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

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

Reply via email to