📄 testdriver.cc
字号:
#include "CxxTester.h"//----------------------------------------------------------------------//// startup for linux // startup for windows ////----------------------------------------------------------------------//int main(int argc, char** argv) // BOOL CxxMain::InitInstance() { // { return cxxloop(argc,argv); // return cxxloop();} // }cxxcall(mult){ int p1 = DIN["p1"]; int p2 = DIN["p2"]; int res = p1 * p2; // this tiny operation is // the first object to test DOUT["res"] = res;}cxxcall(divide){ int p1 = DIN["p1"]; int p2 = DIN["p2"]; double res = (double)p1 / p2; // here's the second one... DOUT["res"] = res;}cxxcall(convert){ char* str = DIN["str"]; DOUT["res"] = atof(str); // ...and the last one}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -