Boost C++ Libraries: Ticket #5317: Path filename(), stem(), and extension() problems https://svn.boost.org/trac10/ticket/5317 <p> Problem: filename() is specified in terms of *--end(), but path_test.cpp does not actually test this. Since the actual implementation of filename() does not use iteration, such a test should be performed. </p> <p> Resolution: Add something like BOOST_TEST_EQ(p.filename(), *--p.end()); to the decomposition tests. </p> <p> Problem: stem() + extension() should == filename(), but path_test.cpp does not actually test this. </p> <p> Resolution: Add something like BOOST_TEST_EQ(p.filename(), path(p.stem().native() + p.extension().native()));); to the decomposition tests. </p> <p> Problem: path(".foo") should be a stem, not an extension. </p> <p> Resolution: Fix specification, implementation, and add test cases. </p> <p> Problem: Design of Path iterator, and as a consequence, filename(), is too inventive in adding "." KISS. Note that POSIX has similar problems. POSIX dirname() and basename() are not good models; they (1) modify their arguments, and (2) return counter-intuitive results. basename("/foo/") returns "foo", not "" or "." </p> <p> Resolution: Simplify specification, change implementation and test cases accordingly. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5317 Trac 1.4.3