@printf "should be: 0x%08x 0x%08x\n" 0x1337 0x1337
./$< tests/Native2 | grep "printstream"
@printf "should be: 0x%08x\n" 0x1337
- ./$< tests/Native2 | grep "Hello World"
- @printf "should be: %s" "Hello World"
+ ./$< tests/Native3 | egrep -e "^Hello World"
+ @printf "should be: %s\n" "Hello World"
+ ./$< tests/Strings1 | egrep -c -e "^okay :-\)"
+ @printf "should be: %d\n" 3
%.class: %.java
$(JAVAC) $<
cio' (off,_) (x:xs) = case x of
IF _ w16 -> twotargets w16
IF_ICMP _ w16 -> twotargets w16
+ IF_ACMP _ w16 -> twotargets w16
GOTO w16 -> onetarget w16
IRETURN -> notarget
ARETURN -> notarget
emit (IINC x imm) = do
add (Disp (cArgs x), ebp) (s8_w32 imm)
+ emit (IF_ACMP cond x) = emit (IF_ICMP cond x)
emit (IF_ICMP cond _) = do
pop eax -- value2
pop ebx -- value1
--- /dev/null
+package tests;
+
+public class Strings1 {
+ public static void main(String []args) {
+ String a = "abc";
+ String b = "abc";
+ String c = "wtf";
+
+ if (a == b) {
+ System.out.println("okay :-)");
+ } else {
+ System.out.println("bad :-(");
+ }
+
+ if (a != c) {
+ System.out.println("okay :-)");
+ } else {
+ System.out.println("bad :-(");
+ }
+
+ if (a == c) {
+ System.out.println("bad :-(");
+ } else {
+ System.out.println("okay :-)");
+ }
+ }
+}