mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 22:10:54 +03:00
Styling: fixed failing unit test TestFlatStyleableValue
- caused by non-english locale - when running on Java 17
This commit is contained in:
@@ -66,6 +66,9 @@ tasks {
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
testLogging.exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
|
||||
|
||||
if( JavaVersion.current() >= JavaVersion.VERSION_1_9 )
|
||||
jvmArgs( listOf( "--add-opens", "java.desktop/javax.swing.plaf.basic=ALL-UNNAMED" ) )
|
||||
}
|
||||
|
||||
register( "sigtestGenerate" ) {
|
||||
|
||||
@@ -25,6 +25,7 @@ import java.awt.Font;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Insets;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Locale;
|
||||
import javax.swing.AbstractButton;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.JButton;
|
||||
@@ -108,7 +109,7 @@ public class TestFlatStyleableValue
|
||||
}
|
||||
|
||||
private void testFloat( JComponent c, StyleableUI ui, String key, float value ) {
|
||||
applyStyle( c, ui, String.format( "%s: %f", key, value ) );
|
||||
applyStyle( c, ui, String.format( Locale.ENGLISH, "%s: %f", key, value ) );
|
||||
assertEquals( value, ui.getStyleableValue( c, key ) );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user