From 475d121596692bee5eacddd3a6fcadae146637b3 Mon Sep 17 00:00:00 2001 From: twinh Date: Fri, 16 Feb 2024 20:58:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=20`suc`=EF=BC=8C`err?= =?UTF-8?q?`=20=E5=87=BD=E6=95=B0=EF=BC=8C=E6=96=B9=E4=BE=BF=E5=A4=96?= =?UTF-8?q?=E9=83=A8=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 3 ++- lib/functions.php | 31 +++++++++++++++++++++++++++++++ tests/unit/RetTest.php | 6 ++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 lib/functions.php diff --git a/composer.json b/composer.json index ea8228680..623fbe9c5 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,8 @@ "Wei\\": "lib" }, "files": [ - "lib/Wei.php" + "lib/Wei.php", + "lib/functions.php" ] }, "autoload-dev": { diff --git a/lib/functions.php b/lib/functions.php new file mode 100644 index 000000000..a123260d7 --- /dev/null +++ b/lib/functions.php @@ -0,0 +1,31 @@ +assert(); $this->assertSame($ret, $result); } + + public function testFn() + { + $this->assertRetSuc(suc()); + $this->assertRetErr(err('x')); + } }