Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions core/src/main/java/ship/test/AergoMock.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,13 @@ public LuaValue call(LuaValue name, LuaValue value) {
}
};

public OneArgFunction print = new OneArgFunction() {
@Override
public LuaValue call(LuaValue msg) {
System.out.println(msg.tojstring());
logger.info(msg.tojstring());
return NIL;
}
};

}
3 changes: 2 additions & 1 deletion core/src/main/java/ship/test/Athena.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ public LuaValue call(final LuaValue modname, final LuaValue env) {
final LuaValue system = tableOf();
system.set("getItem", aergoMock.getItem);
system.set("setItem", aergoMock.setItem);

system.set("print", aergoMock.print);
env.set("system", system);

return library;
}
}