diff --git a/src/test/java/org/eolang/jeo/representation/directives/HasMethod.java b/src/test/java/org/eolang/jeo/representation/directives/HasMethod.java index 16166a751..6cbfd6f52 100644 --- a/src/test/java/org/eolang/jeo/representation/directives/HasMethod.java +++ b/src/test/java/org/eolang/jeo/representation/directives/HasMethod.java @@ -303,9 +303,9 @@ Stream checks(final String root) { Stream.of( instruction.concat("/@base"), String.format( - "%s/o[contains(@base,'int')]/o[@base='org.eolang.bytes' and text()='%s']/@base", + "%s/o[contains(@base,'int')]/o[contains(@base,'number')]/o[contains(@base,'bytes') and text()='%s']/@base", instruction, - new DirectivesValue(this.opcode).hex() + new DirectivesValue((double) this.opcode).hex() ) ), this.arguments(instruction) @@ -322,16 +322,30 @@ private Stream arguments(final String instruction) { .map( arg -> { final String result; - final DirectivesValue hex = new DirectivesValue(arg); - if (arg instanceof BytecodeLabel) { + if (arg instanceof Number) { + final DirectivesValue simple = new DirectivesValue( + arg + ); + final DirectivesValue hex = new DirectivesValue( + ((Number) arg).doubleValue() + ); + result = String.format( + "%s/o[contains(@base,'%s')]/o[contains(@base,'number')]/o[contains(@base,'bytes') and text()='%s']/@base", + instruction, + simple.type(), + hex.hex() + ); + } else if (arg instanceof BytecodeLabel) { + final DirectivesValue hex = new DirectivesValue(arg); result = String.format( - "%s/o[contains(@base,'%s')]/o[@base='org.eolang.bytes']/@base", + "%s/o[contains(@base,'%s')]/o[contains(@base,'bytes')]/@base", instruction, hex.type() ); } else { + final DirectivesValue hex = new DirectivesValue(arg); result = String.format( - "%s/o[contains(@base,'%s')]/o[@base='org.eolang.bytes' and text()='%s']/@base", + "%s/o[contains(@base,'%s')]/o[contains(@base,'bytes') and text()='%s']/@base", instruction, hex.type(), hex.hex()