1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
.class public LBytecodeDemo;
.super Ljava/lang/Object;
.method public static main([Ljava/lang/String;)V
.locals 4
const/16 v0, 0x1
invoke-static {v0}, LBytecodeDemo;->add(I)V
sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;
const-string v1, "Data handling test passed"
invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
return-void
.end method
.method private static add(I)V
.locals 2
move-result-object p0
sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;
const-string v1, "Data handling test passed"
invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
return-void
.end method
.method public static dataHandlingTest()V
.locals 3
const/4 v0, 0x0
array-length v1, p0
if-eqz v1, :cond_0
move-result-object p0
sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;
const-string v1, "Data handling test failed"
invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
:cond_0
return-void
.end method
.method public static arithmeticAndLogicOperationsTest()V
.locals 4
const/16 v0, 0x10
add-int/lit8 v1, v0, 0x3
sub-int v2, v1, v0
mul-int/lit8 v0, v2, 0x7
div-int/lit8 v1, v0, 0x5
sget-object v2, Ljava/lang/System;->out:Ljava/io/PrintStream;
const-string v3, "Arithmetic and logic operations test passed"
invoke-virtual {v2, v3}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
return-void
.end method
.method public static controlFlowOperationsTest()V
.locals 1
const/4 v0, 0x1
if-eqz v0, :cond_0
move-result-object p0
sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;
const-string v1, "Control flow operations test failed"
invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
:cond_0
return-void
.end method
.method public static specificInstructionsTest()V
.locals 2
const-string v0, "Hello, World!"
sget-object v1, Ljava/lang/System;->out:Ljava/io/PrintStream;
invoke-virtual {v1, v0}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
return-void
.end method
|