-
Notifications
You must be signed in to change notification settings - Fork 761
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
Bug 685102 - Scheduled Transactions don't always respect weekends for… #671
Bug 685102 - Scheduled Transactions don't always respect weekends for… #671
Conversation
46/133 Test 46: test-recurrence ..............................***Failed 5.01 sec You'll need to dig into test-recurrence and explore why the test at line 103 has failed. |
One must wonder why the author of that test thought it useful to test 24,300,000 random recurrences, not to stop on the first failure, and not to print out the parameters that cause the failure. Anyway, test-recurrence fails because the day of the month ( I think changing line 98 to
should get the test to pass. Extra credit for instead having @jeanlaroche did you run the |
I'm modifying the test so it now handles wadj. I should also make it fail at the first error.
Ah! That's what I've been missing. Thanks. I'm currently using the test-recurrence target and that's working great for fixing it, but not for running all tests obviously. |
A much better approach.
But it would be no more work to extract that code to a helper function, and it would help shorten |
5624d12
to
66fce05
Compare
I'm still unable to run the full set of tests on my machine, but test-recurrence is now fixed (and improved). |
What's failing |
|
That's googletest. The Xcode generator must not be making the connection between that output file and the gtest target. Does Xcode show a gtest target, and if so does building it first get you further along building the tests? |
Clever touch using the bitwise equals operators to accumulate test results. Thanks. We can keep using this PR discussion to figure out how to get tests built with Xcode if you like, otherwise gnucash-devel or IRC. |
… first occurrence
I gave it another shot. This solution is, I think, simple and acceptable. It does duplicate a small portion of code, but I don't think that's objectionable.
I initially thought the start date in the Recurrence structure could be adjusted if it fell on a week end (and the user does not want that), but if you adjust the start date, subsequent occurrences will happen on the wrong date because they're computed based on the moved start date.
BTW the following tests fail on my machine: