框架及测试用例写法

框架及测试用例

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #if 0
  4. //////////////////////////////////////////////////////////////////////////
  5. // 做一个键值对读取的函数,根据key读取value
  6. // key = "value"
  7. //
  8. int getKeybyValue(char* pKeyValude, char* pKey, char* pValude)
  9. {
  10. return 0;
  11. }
  12. int main()
  13. {
  14. int ret = 0;
  15. char pKeyValude[] = "key1=valude1";
  16. char pKey[] = "key1";
  17. char pValude[1024] = { 0 };
  18. ret = getKeybyValue(pKeyValude, pKey, pValude);
  19. if (ret!=0)
  20. {
  21. printf("func getKeybyValue() err:%d \n", ret);
  22. return ret;
  23. }
  24. printf("Valude:%s \n", pValude);
  25. system("pause");
  26. return 0;
  27. }
  28. #endif




posted @ 2016-06-19 09:22  -刀狂剑痴-  阅读(296)  评论(0编辑  收藏  举报