Stack Exchange
Unit Testing Echo Function
To be more specific I am working on an assignment involving unit testing. These are the test cases I'm currently working on:
#include "c-echo.h"

#include "gtest/gtest.h"

TEST(EchoTest, HelloWorld) {
    char* test_val[3]; test_val[0] = "./c-echo"; test_val[1] = "hello"; test_val[2] = "world";
    EXPECT_EQ("hello world", echo(3.test_val));
}

TEST(EchoTest, EmptyString) {
        char* test_val[1]; test_val[0] = "./c-echo";
        EXPECT_EQ("", echo(1.test_val));
    }

int main(int argc, char **argv) {
  ::testing::InitGoogleTest(&argc, argv);
  return RUN_ALL_TESTS();
}

c-echo.h program:
#include <iostream>

std::string echo(int length, char** chars) {
    std::string ret = "";
    for(int i = 1; i < length; i++) {
        ret += chars[i];
        if(i < length - 1) {
            ret += " ";
        }
    }
    return ret;
}

The assignment stated that I needed to include three additional test cases (edge cases in particular) for the echo function. However, I can't seem to think of any. I'm really new to this whole testing thing. 
Thank You

I can think of edge cases: 1. Zero count of chars. And to break the function: 2. INT_MAX count of chars.

Do you have an actual specification of how echo should behave which would describe what happens on unusual inputs? Or just what you can infer from its implementation?
