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()
{
assert(COfPath::isSamePath(ofT("D:/Java"), ofT("D:\\Java\\")));
}
void testB()
{
auto home = COfPath::getHome();
assert(!home.empty());
auto rp = COfPath::replaceStr(ofT("cpp/z"), ofT("p/"), ofT("Ni"));
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;
}