Verizon 版的iPhone 7不是完全unlocked?# Apple - 家有苹果
d*a
1 楼
Imagine that you need to write a unit test. The function you are *testing*
is "const char * get_country_code (int country_number)". It returns a C
string containing a two-character country code corresponding to the given
number, or NULL for numbers that don't correspond to a valid country code.
Do *NOT* write the get_country_code() function itself - assume that it
already exists, because you just wrote it, and now you want to make sure it
works.
Please write a function that will read a file containing entries like the
sample shown below, and will then *test* get_country_code() to confirm that
it returns the correct value (NULL, or the value listed in the file) for
each input in the range -1..1000. The file contains more lines than are
shown below, but there are fewer than 900 lines.
is "const char * get_country_code (int country_number)". It returns a C
string containing a two-character country code corresponding to the given
number, or NULL for numbers that don't correspond to a valid country code.
Do *NOT* write the get_country_code() function itself - assume that it
already exists, because you just wrote it, and now you want to make sure it
works.
Please write a function that will read a file containing entries like the
sample shown below, and will then *test* get_country_code() to confirm that
it returns the correct value (NULL, or the value listed in the file) for
each input in the range -1..1000. The file contains more lines than are
shown below, but there are fewer than 900 lines.