!747 m { static Class prog; p { prog = hotwire("#1000887"); setClock(15, 34); ask("what time is it?"); expect("It is 15:34."); } static void setClock(int h, int m) ctex { long now; // (h*60+m)*60*1000L Date date = new java.text.SimpleDateFormat("HH:mm").parse("15:34"); now = date.getTime(); print("date: " + date + ", now: " + now); setOpt(prog, "now_virtualTime", now); } static void ask(S q) { set(prog, "question", q); callMain(prog); } static void expect(S a) { S answer = cast get(prog, "answer"); if (a.equals(answer)) print("OK: " + answer); else { print("Wrong: " + answer); print("Expected: " + a); } } }