From d9c7532743541e439643248715d7c0fde1b0fafb Mon Sep 17 00:00:00 2001 From: jinzhongjia Date: Sun, 19 Nov 2023 13:56:43 +0800 Subject: [PATCH] update sidebar --- learn/.vitepress/sidebar.ts | 346 +++++++++++++++++---------------- learn/engineering/unit-test.md | 7 + 2 files changed, 182 insertions(+), 171 deletions(-) create mode 100644 learn/engineering/unit-test.md diff --git a/learn/.vitepress/sidebar.ts b/learn/.vitepress/sidebar.ts index 0b89a598..439f5c54 100644 --- a/learn/.vitepress/sidebar.ts +++ b/learn/.vitepress/sidebar.ts @@ -1,178 +1,182 @@ import { DefaultTheme } from "vitepress"; export default [ - { - text: "前言", - link: "/prologue", - }, - { - text: "什么是 Zig ?", - link: "/what-is-zig", - }, + { + text: "前言", + link: "/prologue", + }, + { + text: "什么是 Zig ?", + link: "/what-is-zig", + }, - { - text: "环境配置", - items: [ - { - text: "安装 Zig 环境", - link: "/environment/install-environment", - }, - { - text: "编辑器选择", - link: "/environment/editor", - }, - { - text: "zig 命令", - link: "/environment/zig-command", - }, - ], - }, - { - text: "Hello World", - link: "/basic/hello-world", - }, - { - text: "基础学习", - items: [ - { - text: "变量声明", - link: "/basic/define-variable", - }, + { + text: "环境配置", + items: [ + { + text: "安装 Zig 环境", + link: "/environment/install-environment", + }, + { + text: "编辑器选择", + link: "/environment/editor", + }, + { + text: "zig 命令", + link: "/environment/zig-command", + }, + ], + }, + { + text: "Hello World", + link: "/basic/hello-world", + }, + { + text: "基础学习", + items: [ + { + text: "变量声明", + link: "/basic/define-variable", + }, - { - text: "基本类型", - collapsed: true, - items: [ - { - text: "数值类型", - link: "/basic/basic_type/number", - }, - { - text: "字符与布尔值", - link: "/basic/basic_type/char-and-boolean", - }, - { - text: "函数", - link: "/basic/basic_type/function", - }, - ], - }, - { - text: "高级类型", - collapsed: true, - items: [ - { - text: "数组", - link: "/basic/advanced_type/array", - }, - { - text: "指针", - link: "/basic/advanced_type/pointer", - }, - { - text: "切片", - link: "/basic/advanced_type/silce", - }, - { - text: "结构体", - link: "/basic/advanced_type/struct", - }, - { - text: "枚举", - link: "/basic/advanced_type/enum", - }, - ], - }, - { - text: "联合类型", - link: "/basic/union", - }, - { - text: "流程控制", - collapsed: true, - items: [ - { - text: "条件", - link: "/basic/process_control/decision", - }, - { - text: "循环", - link: "/basic/process_control/loop", - }, - { - text: "switch匹配", - link: "/basic/process_control/switch", - }, - ], - }, + { + text: "基本类型", + collapsed: true, + items: [ + { + text: "数值类型", + link: "/basic/basic_type/number", + }, + { + text: "字符与布尔值", + link: "/basic/basic_type/char-and-boolean", + }, + { + text: "函数", + link: "/basic/basic_type/function", + }, + ], + }, + { + text: "高级类型", + collapsed: true, + items: [ + { + text: "数组", + link: "/basic/advanced_type/array", + }, + { + text: "指针", + link: "/basic/advanced_type/pointer", + }, + { + text: "切片", + link: "/basic/advanced_type/silce", + }, + { + text: "结构体", + link: "/basic/advanced_type/struct", + }, + { + text: "枚举", + link: "/basic/advanced_type/enum", + }, + ], + }, + { + text: "联合类型", + link: "/basic/union", + }, + { + text: "流程控制", + collapsed: true, + items: [ + { + text: "条件", + link: "/basic/process_control/decision", + }, + { + text: "循环", + link: "/basic/process_control/loop", + }, + { + text: "switch匹配", + link: "/basic/process_control/switch", + }, + ], + }, - { - text: "可选类型", - link: "/basic/optional_type", - }, - { - text: "错误处理", - link: "/basic/error_handle", - }, - ], - }, - { - text: "进阶学习", - items: [ - { - text: "类型转换", - link: "/advanced/type_cast", - }, - { - text: "内存管理", - link: "/advanced/memory_manage", - }, - { - text: "异步", - link: "/advanced/async", - }, - { - text: "模块系统", - link: "/advanced/module-system", - }, - { - text: "编译期", - link: "/advanced/comptime", - }, - { - text: "汇编", - link: "/advanced/assembly", - }, - { - text: "与 C 交互", - link: "/advanced/interact-with-c", - }, - ], - }, - { - text: "工程化", - items: [ - { - text: "构建系统", - link: "/engineering/build-system", - }, - ], - }, - { - text: "附录", - items: [ - // { - // text: "后记", - // link: "/epilogue", - // }, - { - text: "社区", - link: "/appendix/community", - }, - { - text: "第三方库", - link: "/appendix/well-known-lib", - }, - ], - }, + { + text: "可选类型", + link: "/basic/optional_type", + }, + { + text: "错误处理", + link: "/basic/error_handle", + }, + ], + }, + { + text: "进阶学习", + items: [ + { + text: "类型转换", + link: "/advanced/type_cast", + }, + { + text: "内存管理", + link: "/advanced/memory_manage", + }, + { + text: "异步", + link: "/advanced/async", + }, + { + text: "模块系统", + link: "/advanced/module-system", + }, + { + text: "编译期", + link: "/advanced/comptime", + }, + { + text: "汇编", + link: "/advanced/assembly", + }, + { + text: "与 C 交互", + link: "/advanced/interact-with-c", + }, + ], + }, + { + text: "工程化", + items: [ + { + text: "构建系统", + link: "/engineering/build-system", + }, + { + text: "单元测试", + link: "/engineering/unit-test", + }, + ], + }, + { + text: "附录", + items: [ + // { + // text: "后记", + // link: "/epilogue", + // }, + { + text: "社区", + link: "/appendix/community", + }, + { + text: "第三方库", + link: "/appendix/well-known-lib", + }, + ], + }, ] as DefaultTheme.Sidebar; diff --git a/learn/engineering/unit-test.md b/learn/engineering/unit-test.md new file mode 100644 index 00000000..0ea2d418 --- /dev/null +++ b/learn/engineering/unit-test.md @@ -0,0 +1,7 @@ +--- +outline: deep +--- + +# 单元测试 + +TODO