PageRenderTime 46ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Examples/test-suite/octave/li_cstring_runme.m

#
Objective C | 39 lines | 28 code | 11 blank | 0 comment | 10 complexity | f178147e41ff28612884b40b133f966c MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. li_cstring
  2. if (count("ab\0ab\0ab\0", 0) != 3)
  3. error
  4. endif
  5. if (!strcmp(test1(),"Hello World"))
  6. error
  7. endif
  8. if (!strcmp(test2()," !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_"))
  9. error
  10. endif
  11. if (!strcmp(test3("hello"),"hello-suffix"))
  12. error(test3("hello"))
  13. endif
  14. if (!strcmp(test4("hello"),"hello-suffix"))
  15. error(test4("hello"))
  16. endif
  17. if (!strcmp(test5(4),'xxxx'))
  18. error
  19. endif
  20. if (!strcmp(test6(10),'xxxxx'))
  21. error
  22. endif
  23. if (!strcmp(test7(),"Hello world!"))
  24. error
  25. endif
  26. if (!strcmp(test8()," !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_"))
  27. error
  28. endif