Skip to content

Commit 845916c

Browse files
committed
fix architecture tests
1 parent 23cbd54 commit 845916c

2 files changed

Lines changed: 16 additions & 5 deletions

File tree

src/main/java/org/htmlunit/javascript/host/intl/Locale.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ public Object getBaseName() {
291291
* @return a new Locale instance with maximized subtags
292292
*/
293293
@JsxFunction
294-
public Object maximize() {
294+
public Locale maximize() {
295295
final String region;
296296
if (region_ != null) {
297297
region = region_;
@@ -325,7 +325,7 @@ public Object maximize() {
325325
* @return a new Locale instance with minimized subtags
326326
*/
327327
@JsxFunction
328-
public Object minimize() {
328+
public Locale minimize() {
329329
final java.util.Locale locale = new java.util.Locale.Builder()
330330
.setLanguage(language_)
331331
.setExtension('u', locale_.getExtension('u'))
@@ -340,9 +340,8 @@ public Object minimize() {
340340
/**
341341
* @return the locale's Unicode locale identifier string
342342
*/
343-
@Override
344-
@JsxFunction
345-
public String toString() {
343+
@JsxFunction(functionName = "toString")
344+
public String js_toString() {
346345
if (locale_ == null) {
347346
return super.toString();
348347
}

src/test/java/org/htmlunit/archunit/ArchitectureTest.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,17 @@ public boolean test(final JavaClass javaClass) {
314314
.and().doNotHaveFullName("org.htmlunit.javascript.host.html.HTMLProgressElement.getValue()")
315315
.and().doNotHaveFullName("org.htmlunit.javascript.host.html.HTMLSelectElement.getValue()")
316316
.and().doNotHaveFullName("org.htmlunit.javascript.host.html.HTMLTextAreaElement.getValue()")
317+
318+
.and().doNotHaveFullName("org.htmlunit.javascript.host.intl.Locale.getBaseName()")
319+
.and().doNotHaveFullName("org.htmlunit.javascript.host.intl.Locale.getCalendar()")
320+
.and().doNotHaveFullName("org.htmlunit.javascript.host.intl.Locale.getCaseFirst()")
321+
.and().doNotHaveFullName("org.htmlunit.javascript.host.intl.Locale.getCollation()")
322+
.and().doNotHaveFullName("org.htmlunit.javascript.host.intl.Locale.getHourCycle()")
323+
.and().doNotHaveFullName("org.htmlunit.javascript.host.intl.Locale.getLanguage()")
324+
.and().doNotHaveFullName("org.htmlunit.javascript.host.intl.Locale.getNumberingSystem()")
325+
.and().doNotHaveFullName("org.htmlunit.javascript.host.intl.Locale.getRegion()")
326+
.and().doNotHaveFullName("org.htmlunit.javascript.host.intl.Locale.getScript()")
327+
317328
.and().doNotHaveFullName("org.htmlunit.javascript.host.worker.DedicatedWorkerGlobalScope.getSelf()")
318329
.and().doNotHaveFullName("org.htmlunit.javascript.host.xml.XMLHttpRequest.getResponse()")
319330
.and().doNotHaveFullName("org.htmlunit.javascript.host.xml.XMLHttpRequest.getResponseXML()")
@@ -347,6 +358,7 @@ public boolean test(final JavaClass javaClass) {
347358
.and().doNotHaveFullName("org.htmlunit.javascript.host.SimpleArray.item(int)")
348359
.and().doNotHaveFullName("org.htmlunit.javascript.host.SimpleArray.namedItem(java.lang.String)")
349360
.and().doNotHaveFullName("org.htmlunit.javascript.host.Storage.getItem(java.lang.String)")
361+
.and().doNotHaveFullName("org.htmlunit.javascript.host.Window.queueMicrotask(org.htmlunit.corejs.javascript.Context, org.htmlunit.corejs.javascript.Scriptable, org.htmlunit.corejs.javascript.Scriptable, [Ljava.lang.Object;, org.htmlunit.corejs.javascript.Function)")
350362
.and().doNotHaveFullName("org.htmlunit.javascript.host.Window.setInterval(org.htmlunit.corejs.javascript.Context, org.htmlunit.corejs.javascript.Scriptable, org.htmlunit.corejs.javascript.Scriptable, [Ljava.lang.Object;, org.htmlunit.corejs.javascript.Function)")
351363
.and().doNotHaveFullName("org.htmlunit.javascript.host.Window.setTimeout(org.htmlunit.corejs.javascript.Context, org.htmlunit.corejs.javascript.Scriptable, org.htmlunit.corejs.javascript.Scriptable, [Ljava.lang.Object;, org.htmlunit.corejs.javascript.Function)")
352364
.and().doNotHaveFullName("org.htmlunit.javascript.host.css.CSSRuleList.item(int)")

0 commit comments

Comments
 (0)