add unit test for c2s
refactor unit test with table driven test
add tips type
add tips code