DocTest.cxx 619 B

123456789101112131415161718192021222324252627282930313233
  1. #include <fstream>
  2. #include <iostream>
  3. #include <stdio.h>
  4. int main ()
  5. {
  6. int result = 0;
  7. // parse the dart test file
  8. std::ifstream fin("UndefinedProperties.txt");
  9. if(!fin)
  10. {
  11. fprintf(stderr,"failed to find undefined properties file");
  12. return 1;
  13. }
  14. char buffer[1024];
  15. while ( fin )
  16. {
  17. buffer[0] = 0;
  18. fin.getline(buffer, 1023);
  19. buffer[1023] = 0;
  20. std::string line = buffer;
  21. if(line.size() && line.find("with scope VARIABLE") == std::string::npos)
  22. {
  23. fprintf(stderr, "%s\n", line.c_str());
  24. result = 1;
  25. }
  26. }
  27. fin.close();
  28. return result;
  29. }