|
1 | | -class Keywords { |
2 | | - public static void main(String[] args) { |
3 | | - String and = "this is and"; |
4 | | - System.out.println(and); |
| 1 | +import junit.framework.*; |
5 | 2 |
|
6 | | - String del = "this is del"; |
7 | | - System.out.println(del); |
| 3 | +public class Keywords extends TestCase { |
| 4 | + public static void main(String[] args) { |
| 5 | + String and = "this is and"; |
| 6 | + Assert.assertEquals(and, "this is and"); |
8 | 7 |
|
9 | | - String elif = "this is elif"; |
10 | | - System.out.println(elif); |
| 8 | + String del = "this is del"; |
| 9 | + Assert.assertEquals(del, "this is del"); |
11 | 10 |
|
12 | | - String in = "this is in"; |
13 | | - System.out.println(in); |
| 11 | + String elif = "this is elif"; |
| 12 | + Assert.assertEquals(elif, "this is elif"); |
14 | 13 |
|
15 | | - String is = "this is is"; |
16 | | - System.out.println(is); |
| 14 | + String in = "this is in"; |
| 15 | + Assert.assertEquals(in, "this is in"); |
17 | 16 |
|
18 | | - String not = "this is not"; |
19 | | - System.out.println(not); |
| 17 | + String is = "this is is"; |
| 18 | + Assert.assertEquals(is, "this is is"); |
20 | 19 |
|
21 | | - String or = "this is or"; |
22 | | - System.out.println(or); |
| 20 | + String not = "this is not"; |
| 21 | + Assert.assertEquals(not, "this is not"); |
23 | 22 |
|
24 | | - String print = "this is print"; |
25 | | - System.out.println(print); |
| 23 | + String or = "this is or"; |
| 24 | + Assert.assertEquals(or, "this is or"); |
26 | 25 |
|
27 | | - String str = "this is str"; |
28 | | - System.out.println(str); |
| 26 | + String print = "this is print"; |
| 27 | + Assert.assertEquals(print, "this is print"); |
29 | 28 |
|
| 29 | + String str = "this is str"; |
| 30 | + Assert.assertEquals(str, "this is str"); |
30 | 31 | } |
31 | 32 | } |
0 commit comments