fix: fix comment for new added files.

- translate zh-CN comment into en-US.
- change some comment into Doxygen style.
- add lost Doxygen comment.
- enrich the testbench for ceil_div.
- add lost metaprogramming functions for some files in macro namespace.
This commit is contained in:
2025-08-11 21:57:42 +08:00
parent 17540072d3
commit 20a9ef4166
8 changed files with 419 additions and 187 deletions

View File

@ -2,12 +2,18 @@
#include <yycc.hpp>
#include <yycc/num/op.hpp>
#include <yycc/rust/prelude.hpp>
#define OP ::yycc::num::op
namespace yycctest::num::op {
TEST(NumOp, DivCeil) {
EXPECT_EQ(OP::div_ceil<uint32_t>(7, 4), UINT32_C(2));
// Normal case
EXPECT_EQ(OP::div_ceil<u32>(8, 4), UINT32_C(2));
EXPECT_EQ(OP::div_ceil<u32>(7, 4), UINT32_C(2));
// Limit case
EXPECT_EQ(OP::div_ceil<u8>(255, 2), UINT8_C(128));
}
}