Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
HFTSoftwareProject
testcases
Commits
739e6112
Commit
739e6112
authored
Sep 24, 2024
by
Younis
Browse files
Add new file SchachtelArraysTest
parent
4e328892
Changes
1
Hide whitespace changes
Inline
Side-by-side
SchachtelArraysTest.java
0 → 100644
View file @
739e6112
import
org.junit.Test
;
import
static
org
.
junit
.
Assert
.*;
public
class
SchachtelArraysTest
{
@Test
public
void
testMymatrixA
()
{
int
[][]
expected
=
{{
10
,
11
,
12
},
{
20
,
21
,
22
},
{
30
,
31
,
33
}};
assertArrayEquals
(
expected
,
SchachtelArrays
.
mymatrixA
);
}
@Test
public
void
testMymatrixB
()
{
int
[][]
expected
=
{{
10
,
11
,
12
},
{
20
,
21
,
22
},
{
30
,
31
,
32
}};
assertArrayEquals
(
expected
,
SchachtelArrays
.
mymatrixB
);
}
@Test
public
void
testMymatrixC
()
{
int
[][]
expected
=
{{
10
,
11
,
12
},
{
20
,
21
,
22
},
{
30
,
31
,
32
}};
assertArrayEquals
(
expected
,
SchachtelArrays
.
mymatrixC
);
}
@Test
public
void
testMymatrixD
()
{
int
[][]
expected
=
new
int
[
3
][
3
];
for
(
int
i
=
0
;
i
<
expected
.
length
;
i
++)
{
for
(
int
j
=
0
;
j
<
expected
[
i
].
length
;
j
++)
{
expected
[
i
][
j
]
=
10
*
i
+
j
;
}
}
assertArrayEquals
(
expected
,
SchachtelArrays
.
mymatrixD
);
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment