On Fri, 19 Apr 2024 17:33:39 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

>> I am new to testing in the JFX project. It seems that `test.` is required as 
>> package prefix. Thus, I did not use the approach of package-private methods 
>> and classes, but needed to make the class and the tested method public.
>> 
>> However, now I get the (expected) error that the module `javafx.graphics` 
>> does not export `com.sun.glass.ui.win` to unnamed module @0x1e6454ec.
>> 
>> 
>> class test.com.sun.glass.ui.win.WinTextRangeProviderTest (in unnamed module 
>> @0x1e6454ec) cannot access class com.sun.glass.ui.win.WinTextRangeProvider 
>> (in module javafx.graphics) because module javafx.graphics does not export 
>> com.sun.glass.ui.win to unnamed module @0x1e6454ec
>> java.lang.IllegalAccessError: class 
>> test.com.sun.glass.ui.win.WinTextRangeProviderTest (in unnamed module 
>> @0x1e6454ec) cannot access class com.sun.glass.ui.win.WinTextRangeProvider 
>> (in module javafx.graphics) because module javafx.graphics does not export 
>> com.sun.glass.ui.win to unnamed module @0x1e6454ec
>>      at 
>> test.com.sun.glass.ui.win.WinTextRangeProviderTest.getValidStringIndex
>
>> module `javafx.graphics` does not export `com.sun.glass.ui.win` to unnamed 
>> module @0x1e6454ec.
> 
> I think you need to add
> 
> --add-exports javafx.graphics/com.sun.glass.ui.win=ALL-UNNAMED
> 
> to graphics/src/test/addExports
> (see line 7)
> 
> @kevinrushforth I wonder if there was a way to auto-generate addExports 
> somehow, at least the part needed for the tests.

@andy-goryachev-oracle I think, I'm finished. (The "tests" requested at 
https://github.com/openjdk/jfx/pull/1442#issuecomment-2064196119 were IMHO the 
"simple" unit tests I provided - not some accessibility engine tests)

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

PR Comment: https://git.openjdk.org/jfx/pull/1442#issuecomment-2073091386

Reply via email to