-
-
Notifications
You must be signed in to change notification settings - Fork 342
Add appveyor.yml configuration. (fixes #258) #260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@fnc12 Please help to resolve errors on windows, I resolved dependency errors on windows, but now we can see some compile errors on |
|
please paste error text here |
|
@fnc12 you can see in Details left on appveyor also for example error: Did you have any idea? |
|
@fnc12 I found it, this problem because of Bug in MSVC, and workaround about it in stackoverflow |
…n Debug mode. (see fnc12#258)
|
@fnc12 please cancel all queue run, and rerun again, I wish to pass test :) thanks |
|
@fnc12 did you can resolve below warnings:
if you can, please add changes in this PR thanks |
|
@fnc12 As you can see in appveyor release failed report , project compile correctly but in ctest we can get error, but in debug mode test pass ( in local run ) . so if you have time, please help me to investigate ctest release mode problem in windows. thanks |
Problem is for testExplicitInsert function, but I don't know why |
|
@fnc12 After I some times debug it, I found line of error exception in get function and is after this line we catch exception. I hope this information is useful for you to debug it. |
|
this is weird. My local run is also successful. Looks like that we insert a used with explicit id and cannot get him on the next line. If there is a way to see for(auto &row : storage.iterate<User>()){
cout << storage.dump(user) << endl;
}It will show us all contents of the table before getting any row. Thanks |
It is weird for me too at first, but I found the problem, it is because my wackiness, just one record printed. to resolved this issue I have to undef NDEUBG in tests.cpp |
|
I think it is better to replace |
|
@fnc12 As you can see in last commit, I just undef |
|
Finally test pass in release mode :) And finally all check pass in PR :) |
|
that's cool but let's instead throw an exception instead of asserts. I know that it is my mistake that I wrote asserts instead of exception in the very beginning. I can fix it by myself |
|
Commiting |
|
@fnc12 if you want I can replace it, but I think undef Using undef |
|
define |
Ok, but I change this macro only in tests.cpp and only up of cassert header and back them normally after include, this change does not change any behavior on app or on STL and dependencies library. I sure it. please look that I define in tests.cpp not in header file or in build system. all assert in somewhere else disable, because I change NDEBUG locally in tests.cpp and after including sqlite_orm.h, and back to original value after including cassert. |
|
I see but once we need a generic assert in tests and game over cause assert must fire on debug build not in release build. But our tests will have the same behavior for both cases |
|
Let me change it quickly in a 5 min |
Ok, any way you like :) |
|
Merged in #262 . Sorry for being late |
|
@fnc12 no problem, thanks for working, but this PR #262, does not resolve above problem. the problem in release mode is assert does not call so for example below code does not call assert(user3.id == storage.insert(user3, columns(&User::id, &User::name, &User::age, &User::email)));and then auto insertedUser3 = storage.get<User>(user3.id);does not work, because insert does not call before. The another note is in release mode all check in tests.cpp ( all assert in all functions) does not work and practically you do not test any thing if you do not define assert in release mode. I think the fast and good solution to resolve this problem is to undef NDEBUG locally. |
|
Sh*t. I was in a hurry. Sorry. I'll fix it in 10 min |
|
@fnc12 Ok, no problem, but still I think assert is good solution :D We can use assert until switching to GTest :) thanks very much for follow up this PR :) |
|
fixed in #263 |
|
@fnc12 Thanks for replaying, but it is not work too, above line is just example, for example another line is assert(visit2.id() == storage.insert(visit2, columns(&Visit::setId, &Visit::setUsedId)));I think when disable assert, most of tests is meaningless , why you want to do this? ( you can not check behavior is correct, because assert does not working. and you must change all assert in tests.cpp if you want to check behavior is correct ) |
|
OMG. I still sure that defining/undefining |
|
#265 fixed here. Now it must work anyway |
7aa9301 to
80ddd16
Compare
|
thanks to you |
ITNOA
Add appveyor configuration for CI on windows :) . (resolve #258 )