ofen/test/main.cpp

27 lines
448 B
C++
Raw Normal View History

2024-11-14 16:04:54 +08:00
#include <iostream>
2024-11-29 12:02:56 +08:00
#include "of_path.h"
#include <cassert>
using namespace ofen;
void testA()
{
2024-12-12 22:42:44 +08:00
assert(COfPath::is_same_path(ofT("D:/Java"), ofT("D:\\Java\\")));
2024-11-29 12:02:56 +08:00
}
void testB()
{
2024-12-12 22:42:44 +08:00
auto home = COfPath::get_home();
2024-11-29 12:02:56 +08:00
assert(!home.empty());
2024-12-12 22:42:44 +08:00
auto rp = COfPath::replace(ofT("cpp/z"), ofT("p/"), ofT("Ni"));
2024-11-29 12:02:56 +08:00
assert(rp == ofT("cpNiz"));
}
2024-11-14 16:04:54 +08:00
int main()
{
2024-11-29 12:02:56 +08:00
testA();
testB();
2024-11-14 16:04:54 +08:00
std::cout << "Done" << std::endl;
return 0;
}