mirror of
https://github.com/pevans/erc-c.git
synced 2024-08-21 00:29:00 +00:00
Add tests for get_width and get_height
This commit is contained in:
parent
04d40a44f9
commit
eeecaf4bdc
@ -97,3 +97,31 @@ Test(options, parse)
|
||||
|
||||
cr_assert_eq(option_parse(argc, argv), 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* The get_width and get_height tests also implicitly test the
|
||||
* option_set_size() function (which is called by option_parse()).
|
||||
*/
|
||||
Test(options, get_width)
|
||||
{
|
||||
int argc = 2;
|
||||
char *argv[] = {
|
||||
"prog_name",
|
||||
"--size=875x600",
|
||||
};
|
||||
|
||||
cr_assert_eq(option_parse(argc, argv), 1);
|
||||
cr_assert_eq(option_get_width(), 875);
|
||||
}
|
||||
|
||||
Test(options, get_height)
|
||||
{
|
||||
int argc = 2;
|
||||
char *argv[] = {
|
||||
"prog_name",
|
||||
"--size=875x600",
|
||||
};
|
||||
|
||||
cr_assert_eq(option_parse(argc, argv), 1);
|
||||
cr_assert_eq(option_get_height(), 600);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user