mirror of
https://github.com/RubyMetric/chsrc.git
synced 2025-01-22 19:24:06 +08:00
Test framework logging
This commit is contained in:
parent
e9d41ffe6f
commit
3f8f8b0619
|
@ -80,8 +80,8 @@ bool CliOpt_NoColor = false;
|
|||
#define chsrc_info(str) xy_info(App_Name,str)
|
||||
#define chsrc_warn(str) xy_warn(App_Name,str)
|
||||
#define chsrc_error(str) xy_error(App_Name,str)
|
||||
#define chsrc_debug(str) xy_warn(App_Name "DEBUG",str)
|
||||
#define chsrc_verbose(str) xy_info(App_Name,str)
|
||||
#define chsrc_debug(str) xy_warn(App_Name "(DEBUG)",str)
|
||||
#define chsrc_verbose(str) xy_info(App_Name "(VERBOSE)",str)
|
||||
|
||||
#define red(str) xy_str_to_red(str)
|
||||
#define blue(str) xy_str_to_blue(str)
|
||||
|
|
38
test/fw.c
Normal file
38
test/fw.c
Normal file
|
@ -0,0 +1,38 @@
|
|||
/** ------------------------------------------------------------
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
* -------------------------------------------------------------
|
||||
* File Authors : Aoran Zeng <ccmywish@qq.com>
|
||||
* Contributors : Nil Null <nil@null.org>
|
||||
* |
|
||||
* Created On : <2024-12-14>
|
||||
* Last Modified : <2024-12-14>
|
||||
* ------------------------------------------------------------*/
|
||||
|
||||
#define Chsrc_Version "sid"
|
||||
|
||||
#include "../src/framework/core.c"
|
||||
|
||||
int
|
||||
main (int argc, char const *argv[])
|
||||
{
|
||||
br();
|
||||
chsrc_log ("chsrc_log");
|
||||
chsrc_succ ("chsrc_succ");
|
||||
chsrc_info ("chsrc_info");
|
||||
chsrc_warn ("chsrc_warn");
|
||||
chsrc_error ("chsrc_error");
|
||||
chsrc_debug ("chsrc_debug");
|
||||
chsrc_verbose ("chsrc_verbose");
|
||||
|
||||
chsrc_succ2 ("chsrc_succ2");
|
||||
chsrc_log2 ("chsrc_log2");
|
||||
chsrc_note2 ("chsrc_note2");
|
||||
chsrc_warn2 ("chsrc_warn2");
|
||||
chsrc_error2 ("chsrc_error2");
|
||||
chsrc_debug2 ("chsrc_debug2");
|
||||
chsrc_verbose2 ("chsrc_verbose2");
|
||||
|
||||
chsrc_backup ("README.md");
|
||||
chsrc_succ2 ("Test framework successfully!");
|
||||
return 0;
|
||||
}
|
|
@ -3,10 +3,12 @@
|
|||
* -------------------------------------------------------------
|
||||
* File Name : xy.c
|
||||
* File Authors : Aoran Zeng <ccmywish@qq.com>
|
||||
* Contributors : Nil Null <nil@null.org>
|
||||
* |
|
||||
* Created On : <2023-08-30>
|
||||
* Last Modified : <2024-11-21>
|
||||
* Last Modified : <2024-12-14>
|
||||
*
|
||||
* 测试 xy.h
|
||||
* Test xy.h
|
||||
* ------------------------------------------------------------*/
|
||||
|
||||
#include "xy.h"
|
||||
|
@ -101,7 +103,7 @@ main (int argc, char const *argv[])
|
|||
puts (xy_normalize_path (" \n ~/haha/test/123 \n\r "));
|
||||
assert_str (xy_normalize_path ("~/haha/test"), xy_parent_dir (" ~/haha/test/123"));
|
||||
|
||||
xy_succ ("测试完成", "测试全部通过");
|
||||
xy_succ ("测试完成", "xy.h 测试全部通过");
|
||||
|
||||
// xy_unimplemented();
|
||||
// xy_unsupported();
|
||||
|
|
Loading…
Reference in New Issue
Block a user