Page MenuHome

BLI_path_util_test.cc - new tests
Needs ReviewPublic

Authored by Michał Ziobro (Muchomor) on Dec 19 2015, 5:43 PM.

Details

Summary

I added a few tests for some functions from BLI_path_util.h

Diff Detail

Repository
rB Blender

Event Timeline

Michał Ziobro (Muchomor) retitled this revision from to BLI_path_util_test.cc - new tests.
Michał Ziobro (Muchomor) updated this object.
Michał Ziobro (Muchomor) set the repository for this revision to rB Blender.
Michał Ziobro (Muchomor) added projects: BF Blender, Restricted Project.
Sergey Sharybin (sergey) requested changes to this revision.Dec 22 2015, 3:44 PM

Tests are to be atomic, meaning they should not be just grouped by the function they're testing, but should also indicate what exact case they're testing.

PathUtilEnsureExtensionNoOrigFileExtension
PathUtilEnsureExtensionWothOrigFileExtension

and so on. otherwise you don't easily see what exact case fails.

This revision now requires changes to proceed.Dec 22 2015, 3:44 PM
Michał Ziobro (Muchomor) edited edge metadata.

Hmm, I split new tests, should I do same with previous?

No need to touch existing tests in this patch, could happen as a separate change. But some tests are failing here:

[  FAILED  ] 4 tests, listed below:
[  FAILED  ] path_util.PathUtilSplitNameNumWithoutDelimiter
[  FAILED  ] path_util.PathUtilSplitNameNumMultipleNumbers
[  FAILED  ] path_util.PathUtilSplitNameNumMultipleNumbersAndDelimiters
[  FAILED  ] path_util.PathUtilPathFrameRangeTooFewHashes

Hmm, all tests are passed on my build.
Could you send me full output from these four tests and definition of functions which not pass?
(I'm using quite fresh code, just would like to know they are same surely.)

Michał Ziobro (Muchomor) edited edge metadata.

Huh, buffer were too short.
Now everything should be correct.