ofen/test/main.cpp

28 lines
467 B
C++
Raw Normal View History

2024-11-14 16:04:54 +08:00
#include <iostream>
#include "of_str.h"
#include <of_path.h>
2024-11-29 12:02:56 +08:00
#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());
auto rp = COfStr::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;
}