Skip to content

Commit

Permalink
feat(objectionary#715): fix BytecodeMethodTest
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed Sep 23, 2024
1 parent 179683b commit fbda45b
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ Stream<String> checks(final String root) {
Stream.of(
instruction.concat("/@base"),
String.format(
"%s/o[contains(@base,'int') and @data='bytes' and text()='%s']/@base",
"%s/o[contains(@base,'int')]/o[@data='bytes' and text()='%s']/@base",
instruction,
new HexData(this.opcode).value()
)
Expand All @@ -327,13 +327,13 @@ private Stream<String> arguments(final String instruction) {
final HexData hex = new HexData(arg);
if (arg instanceof Label) {
result = String.format(
"%s/o[contains(@base,'%s') and @data='bytes']/@data",
"%s/o[contains(@base,'%s')]/o[@data='bytes']/@data",
instruction,
hex.type()
);
} else {
result = String.format(
"%s/o[contains(@base,'%s') and @data='bytes' and text()='%s']/@data",
"%s/o[contains(@base,'%s')]/o[@data='bytes' and text()='%s']/@data",
instruction,
hex.type(),
hex.value()
Expand Down Expand Up @@ -385,7 +385,7 @@ Stream<String> checks(final String root) {
"%s/o[4][contains(@base,'string')]/@base", HasTryCatch.path(root)
),
String.format(
"%s/o[4][contains(@base,'string') and text()='%s']/@data",
"%s/o[4][contains(@base,'string')]/o[text()='%s']/@data",
HasTryCatch.path(root),
new HexData(this.type).value()
)
Expand Down Expand Up @@ -422,7 +422,7 @@ private static final class HasLabel {
static Stream<String> checks(final String root) {
return Stream.of(
String.format(
"%s/o[contains(@base,'seq') and @name='@']/o[contains(@base,'label') and @data='bytes']/@data",
"%s/o[contains(@base,'seq') and @name='@']/o[contains(@base,'label')]/o[@data='bytes']/@data",
root
)
);
Expand Down

0 comments on commit fbda45b

Please sign in to comment.