Closed kermit10000000 closed 7 years ago
@kermit10000000 It is nice to have it before 0.2.0 release.
ok, i will work on it then.
Current scenarios proposed:
Current problem: i am not sure what should be path to txt file and also it has problems to find the file:
when this will be answered and solved we will close this issue
Another weird bug is :
count is part of std...
@kermit10000000 http://www.cplusplus.com/reference/algorithm/count/ example section:
// count algorithm example
#include <iostream> // std::cout
#include <algorithm> // std::count
#include <vector> // std::vector
int main () {
// counting elements in array:
int myints[] = {10,20,30,30,20,10,10,20}; // 8 elements
int mycount = std::count (myints, myints+8, 10);
std::cout << "10 appears " << mycount << " times.\n";
// counting elements in container:
std::vector<int> myvector (myints, myints+8);
mycount = std::count (myvector.begin(), myvector.end(), 20);
std::cout << "20 appears " << mycount << " times.\n";
return 0;
}
..so #include <algorithm> // std::count
is essential here
Ohh right, i did not move it from code blocks where i was testing to the git files(that is why it worked there)... Thank you for noticing.
Ok so we are back to never ending test: https://travis-ci.org/JaroslawWiosna/regionalizer/builds/288262095 (killed only because of timeout) that i know works(code tested in code blocks with txt attached in proj files) but looks like can not find right txt file with the path given here(the one he finds is somehow infinite)
I have found that it can be used while( std::getline(cities_data,input)) insted of while(!cities_data.eof()) to fail the test(not get into infinite loop as it stops reading in case of at least one empty line that can not happened in our database). It proves us that file we open is not the one we want to use.
So far 0 new results, i have tested it with ios::binary, another files name(to check spelling and stuff), checked case of no permission to file(we do have on like 99%), checked case with moving file to the same place as the .cpp file, checked in cmake if we need to add file there, checked different paths. I will continue investigation but I don't promise anything...
Descripition(grammar guardian - there is missing "i" - Descrption in template)
Tests for database(common rules must be checked for the file + maybe some city/ies data like Warsaw to see correctness
Release affected
I think it should be done but i am not sure if HAS TO for v0.2 or maybe for later versions. waiting for your opinion @JaroslawWiosna
Priority
Same as above
Is there possible contributor who could fix the issue
Yes, I will handle it.