Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanMeans committed Sep 30, 2019
1 parent 1f646f6 commit e4d655e
Showing 1 changed file with 84 additions and 82 deletions.
166 changes: 84 additions & 82 deletions modules/c/nitf/unittests/test_image_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ TEST_CASE(testPBlockOneBand)
"MMMMNNNNOOOOPPPP"
};
nitf_Error error;
TestSpec pTypeTests[] = {
TestSpec pTypeTests[] =
{
{
"P",
"INT",
Expand All @@ -205,9 +206,9 @@ TEST_CASE(testPBlockOneBand)
0, 4,
0, NUM_COLS,

"AAAAAAAAAAAAAAAA"\
"BBBBBBBBBBBBBBBB"\
"CCCCCCCCCCCCCCCC"\
"AAAAAAAAAAAAAAAA"
"BBBBBBBBBBBBBBBB"
"CCCCCCCCCCCCCCCC"
"DDDDDDDDDDDDDDDD"
},
{
Expand All @@ -222,21 +223,21 @@ TEST_CASE(testPBlockOneBand)
0, NUM_ROWS,
0, NUM_COLS,

"AAAAAAAAAAAAAAAA"\
"BBBBBBBBBBBBBBBB"\
"CCCCCCCCCCCCCCCC"\
"DDDDDDDDDDDDDDDD"\
"EEEEEEEEEEEEEEEE"\
"FFFFFFFFFFFFFFFF"\
"GGGGGGGGGGGGGGGG"\
"HHHHHHHHHHHHHHHH"\
"IIIIIIIIIIIIIIII"\
"JJJJJJJJJJJJJJJJ"\
"KKKKKKKKKKKKKKKK"\
"LLLLLLLLLLLLLLLL"\
"MMMMMMMMMMMMMMMM"\
"NNNNNNNNNNNNNNNN"\
"OOOOOOOOOOOOOOOO"\
"AAAAAAAAAAAAAAAA"
"BBBBBBBBBBBBBBBB"
"CCCCCCCCCCCCCCCC"
"DDDDDDDDDDDDDDDD"
"EEEEEEEEEEEEEEEE"
"FFFFFFFFFFFFFFFF"
"GGGGGGGGGGGGGGGG"
"HHHHHHHHHHHHHHHH"
"IIIIIIIIIIIIIIII"
"JJJJJJJJJJJJJJJJ"
"KKKKKKKKKKKKKKKK"
"LLLLLLLLLLLLLLLL"
"MMMMMMMMMMMMMMMM"
"NNNNNNNNNNNNNNNN"
"OOOOOOOOOOOOOOOO"
"PPPPPPPPPPPPPPPP"
}
};
Expand Down Expand Up @@ -283,7 +284,8 @@ TEST_CASE(testPBlockTwoBands)
"MmMmMmMmNnNnNnNnOoOoOoOoPpPpPpPp"
};
nitf_Error error;
TestSpec pTypeTests[] = {
TestSpec pTypeTests[] =
{

{
"P",
Expand Down Expand Up @@ -311,13 +313,13 @@ TEST_CASE(testPBlockTwoBands)
0, 4,
0, NUM_COLS,

"AAAAAAAAAAAAAAAA"\
"BBBBBBBBBBBBBBBB"\
"CCCCCCCCCCCCCCCC"\
"DDDDDDDDDDDDDDDD"\
"aaaaaaaaaaaaaaaa"\
"bbbbbbbbbbbbbbbb"\
"cccccccccccccccc"\
"AAAAAAAAAAAAAAAA"
"BBBBBBBBBBBBBBBB"
"CCCCCCCCCCCCCCCC"
"DDDDDDDDDDDDDDDD"
"aaaaaaaaaaaaaaaa"
"bbbbbbbbbbbbbbbb"
"cccccccccccccccc"
"dddddddddddddddd"
},
{
Expand All @@ -332,39 +334,38 @@ TEST_CASE(testPBlockTwoBands)
0, NUM_ROWS,
0, NUM_COLS,

"AAAAAAAAAAAAAAAA"\
"BBBBBBBBBBBBBBBB"\
"CCCCCCCCCCCCCCCC"\
"DDDDDDDDDDDDDDDD"\
"EEEEEEEEEEEEEEEE"\
"FFFFFFFFFFFFFFFF"\
"GGGGGGGGGGGGGGGG"\
"HHHHHHHHHHHHHHHH"\
"IIIIIIIIIIIIIIII"\
"JJJJJJJJJJJJJJJJ"\
"KKKKKKKKKKKKKKKK"\
"LLLLLLLLLLLLLLLL"\
"MMMMMMMMMMMMMMMM"\
"NNNNNNNNNNNNNNNN"\
"OOOOOOOOOOOOOOOO"\
"PPPPPPPPPPPPPPPP"\
"aaaaaaaaaaaaaaaa"\
"bbbbbbbbbbbbbbbb"\
"cccccccccccccccc"\
"dddddddddddddddd"\
"eeeeeeeeeeeeeeee"\
"ffffffffffffffff"\
"gggggggggggggggg"\
"hhhhhhhhhhhhhhhh"\
"iiiiiiiiiiiiiiii"\
"jjjjjjjjjjjjjjjj"\
"kkkkkkkkkkkkkkkk"\
"llllllllllllllll"\
"mmmmmmmmmmmmmmmm"\
"nnnnnnnnnnnnnnnn"\
"oooooooooooooooo"\
"AAAAAAAAAAAAAAAA"
"BBBBBBBBBBBBBBBB"
"CCCCCCCCCCCCCCCC"
"DDDDDDDDDDDDDDDD"
"EEEEEEEEEEEEEEEE"
"FFFFFFFFFFFFFFFF"
"GGGGGGGGGGGGGGGG"
"HHHHHHHHHHHHHHHH"
"IIIIIIIIIIIIIIII"
"JJJJJJJJJJJJJJJJ"
"KKKKKKKKKKKKKKKK"
"LLLLLLLLLLLLLLLL"
"MMMMMMMMMMMMMMMM"
"NNNNNNNNNNNNNNNN"
"OOOOOOOOOOOOOOOO"
"PPPPPPPPPPPPPPPP"
"aaaaaaaaaaaaaaaa"
"bbbbbbbbbbbbbbbb"
"cccccccccccccccc"
"dddddddddddddddd"
"eeeeeeeeeeeeeeee"
"ffffffffffffffff"
"gggggggggggggggg"
"hhhhhhhhhhhhhhhh"
"iiiiiiiiiiiiiiii"
"jjjjjjjjjjjjjjjj"
"kkkkkkkkkkkkkkkk"
"llllllllllllllll"
"mmmmmmmmmmmmmmmm"
"nnnnnnnnnnnnnnnn"
"oooooooooooooooo"
"pppppppppppppppp"

}
};

Expand Down Expand Up @@ -418,7 +419,8 @@ TEST_CASE(testPBlockOffsetBand)
"MmMmMmMmNnNnNnNnOoOoOoOoPpPpPpPp"
};
nitf_Error error;
TestSpec pTypeTests[] = {
TestSpec pTypeTests[] =
{

{
"P",
Expand Down Expand Up @@ -447,9 +449,9 @@ TEST_CASE(testPBlockOffsetBand)
0, 4,
0, NUM_COLS,

"aaaaaaaaaaaaaaaa"\
"bbbbbbbbbbbbbbbb"\
"cccccccccccccccc"\
"aaaaaaaaaaaaaaaa"
"bbbbbbbbbbbbbbbb"
"cccccccccccccccc"
"dddddddddddddddd"
},

Expand All @@ -465,21 +467,21 @@ TEST_CASE(testPBlockOffsetBand)
0, NUM_ROWS,
0, NUM_COLS,

"aaaaaaaaaaaaaaaa"\
"bbbbbbbbbbbbbbbb"\
"cccccccccccccccc"\
"dddddddddddddddd"\
"eeeeeeeeeeeeeeee"\
"ffffffffffffffff"\
"gggggggggggggggg"\
"hhhhhhhhhhhhhhhh"\
"iiiiiiiiiiiiiiii"\
"jjjjjjjjjjjjjjjj"\
"kkkkkkkkkkkkkkkk"\
"llllllllllllllll"\
"mmmmmmmmmmmmmmmm"\
"nnnnnnnnnnnnnnnn"\
"oooooooooooooooo"\
"aaaaaaaaaaaaaaaa"
"bbbbbbbbbbbbbbbb"
"cccccccccccccccc"
"dddddddddddddddd"
"eeeeeeeeeeeeeeee"
"ffffffffffffffff"
"gggggggggggggggg"
"hhhhhhhhhhhhhhhh"
"iiiiiiiiiiiiiiii"
"jjjjjjjjjjjjjjjj"
"kkkkkkkkkkkkkkkk"
"llllllllllllllll"
"mmmmmmmmmmmmmmmm"
"nnnnnnnnnnnnnnnn"
"oooooooooooooooo"
"pppppppppppppppp"
}
};
Expand Down Expand Up @@ -538,8 +540,8 @@ TEST_CASE(testPBlockThreeBandsWithOffset)
"Mm#Mm#Mm#Mm#Nn$Nn$Nn$Nn$Oo%Oo%Oo%Oo%Pp^Pp^Pp^Pp^"
};
nitf_Error error;
TestSpec pTypeTests[] = {

TestSpec pTypeTests[] =
{
{
"P",
"INT",
Expand Down Expand Up @@ -677,6 +679,7 @@ TEST_CASE(testInvalidReadOrderFailsGracefully)
"Mm#Mm#Mm#Mm#Nn$Nn$Nn$Nn$Oo%Oo%Oo%Oo%Pp^Pp^Pp^Pp^"
"Mm#Mm#Mm#Mm#Nn$Nn$Nn$Nn$Oo%Oo%Oo%Oo%Pp^Pp^Pp^Pp^"
};

nitf_Error error;
TestSpec spec =
{
Expand All @@ -691,12 +694,11 @@ TEST_CASE(testInvalidReadOrderFailsGracefully)
0, 2,
4, 4,

"11112222AAAABBBB"
""
};

TestState* test = constructTestSubheader(&spec);

/* Adjust subwindow to only read from second band */
test->subwindow->numBands = 2;
test->subwindow->bandList = &test->bandList[1];
test->subwindow->bandList[0] = 2;
Expand Down

0 comments on commit e4d655e

Please sign in to comment.