Logo
Explore Help
Sign In
yyc12345/YYCCommonplace
1
0
Fork 0
You've already forked YYCCommonplace
Code Issues Pull Requests Releases Activity
Files
master
YYCCommonplace/testbench/yycc/num/op.cpp

20 lines
420 B
C++
Raw Permalink Normal View History

refactor: migrate rust-like ops. - migrate rust-like ops. - migrate testbench for them but not finished.
2025-08-05 13:53:59 +08:00
#include <gtest/gtest.h>
#include <yycc.hpp>
#include <yycc/num/op.hpp>
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.
2025-08-11 21:57:42 +08:00
#include <yycc/rust/prelude.hpp>
refactor: migrate rust-like ops. - migrate rust-like ops. - migrate testbench for them but not finished.
2025-08-05 13:53:59 +08:00
#define OP ::yycc::num::op
namespace yycctest::num::op {
TEST(NumOp, DivCeil) {
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.
2025-08-11 21:57:42 +08:00
// 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));
refactor: migrate rust-like ops. - migrate rust-like ops. - migrate testbench for them but not finished.
2025-08-05 13:53:59 +08:00
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.2 Page: 653ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API