You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
450 B
16 lines
450 B
#include "unity.h"
|
|
#include "userinput.h"
|
|
#include "fakeinput.h"
|
|
#include <string.h>
|
|
|
|
void setUp(void){}
|
|
void tearDown(void){}
|
|
|
|
void test_gets_WithMinLengthAndMaxLength(void) {
|
|
unsigned long minLength = 3;
|
|
unsigned long maxLength = 10;
|
|
char *input[] = {"ei", "e", "sddfdfdfdfdf", "dddd", NULL};
|
|
fakeInput = input;
|
|
char *actual = gets("", &minLength, &maxLength);
|
|
TEST_ASSERT_EQUAL_CHAR_ARRAY("dddd", actual, strlen(actual));
|
|
}
|