Skip to content

Commit f7a57c8

Browse files
committed
docs: step 2 只留环境验证,进度表挪到 step 3 的可选 note
step 2 摆两条命令、再解释「第一条绿第二条红」,等于在验证环境这一步塞了 一个当下用不上的概念。step 2 现在只做一件事: mcpp test -p solutions # 验证环境: 52 份参考答案, 应当全绿 裸 `mcpp test`(你自己的进度表)本来就属于「不经过 d2x 怎么练」这一类, 归到 step 3 已有的那条可选 note 里,和 `mcpp test -p src/cpp11` 放一起: > 不想经过 d2x? 练习就是测试 —— `mcpp test` 打印你的完整进度表(动手前 > 全红), `mcpp test -p src/cpp11` 只跑某一章。 同步的地方: - README 三语 + book 两语:step 2 收敛为一条命令;<details> 里 clone 那条 路的环境验证也跟着改成 `mcpp test -p solutions`(原来还是裸 mcpp test) - chapter_1 两语:「验证环境」节同样只留参考答案那条;裸 `mcpp test` 落到 已有的「原生模式(可选)」节,作为该节三条命令里的第一条
1 parent 97e0041 commit f7a57c8

7 files changed

Lines changed: 33 additions & 38 deletions

File tree

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,10 @@ xlings install d2x mcpp -y # d2x: exercise framework CLI | mcpp: C++ build & t
7878
d2x install d2mcpp # download the course, toolchain auto-configured
7979
cd d2mcpp
8080
mcpp test -p solutions # verify the environment: 52 reference answers, all green
81-
mcpp test # your progress table: the exercises, all red for now
8281
```
8382

84-
> `solutions/` is a real mcpp package, so the first command compiles and runs all 52
85-
> reference answers — an unambiguous green tick that your toolchain works. The second
86-
> one is your own progress table: the exercises **are** the tests and they ship
87-
> unfinished, so red is exactly where you start.
83+
> `solutions/` is a real mcpp package, so this compiles and runs all 52 reference
84+
> answers — an unambiguous green tick that your toolchain is ready.
8885
8986
<details>
9087
<summary>optional - start from the git source instead</summary>
@@ -95,7 +92,7 @@ mcpp test # your progress table: the exercises, all red for n
9592
git clone https://github.com/mcpp-community/d2mcpp.git # or your fork
9693
cd d2mcpp
9794
xlings install -y # toolchain pinned by .xlings.json
98-
mcpp test # same environment check
95+
mcpp test -p solutions # same environment check
9996
```
10097

10198
> Tip: fork this repo and clone your fork — `git commit / push` keeps your practice progress in your own repository.
@@ -111,7 +108,9 @@ d2x checker # practice loop: edit -> save -> auto-check -> adva
111108
d2x status # progress overview
112109
```
113110

114-
> Want to run a single chapter without d2x? `mcpp test -p src/cpp11` works too.
111+
> Prefer plain mcpp? The exercises **are** the tests — `mcpp test` prints your whole
112+
> progress table (all red until you start), and `mcpp test -p src/cpp11` runs a single
113+
> chapter.
115114
116115
**👉 [more details...](https://mcpp-community.github.io/d2mcpp/base/chapter_1.html)**
117116

README.zh.hant.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,10 @@ xlings install d2x mcpp -y # d2x: 練習框架 CLI | mcpp: C++ 建置與測試
7878
d2x install d2mcpp # 下載課程,環境自動配置
7979
cd d2mcpp
8080
mcpp test -p solutions # 驗證環境: 52 份參考答案, 應當全綠
81-
mcpp test # 你的進度表: 練習還沒做, 此刻全紅
8281
```
8382

84-
> `solutions/` 本身就是一個 mcpp 工程, 所以第一條指令會真的編譯並執行全部 52 份參考答案 ——
85-
> 全綠即工具鏈沒問題, 這是個不含糊的訊號。第二條才是你自己的進度表: 練習**就是**測試,
86-
> 而且發下來時是沒做完的, 全紅正是起點。
83+
> `solutions/` 本身就是一個 mcpp 工程, 所以這條指令會真的編譯並執行全部 52 份參考答案 ——
84+
> 全綠即工具鏈就緒, 這是個不含糊的訊號。
8785
8886
<details>
8987
<summary>可選 - 改用 clone 專案原始碼的方式</summary>
@@ -94,7 +92,7 @@ mcpp test # 你的進度表: 練習還沒做, 此刻全紅
9492
git clone https://github.com/mcpp-community/d2mcpp.git # 或你 fork 後的倉庫
9593
cd d2mcpp
9694
xlings install -y # 按 .xlings.json 安裝固定版本工具鏈
97-
mcpp test # 同樣的環境驗證
95+
mcpp test -p solutions # 同樣的環境驗證
9896
```
9997

10098
> 建議: 先 fork 本倉庫再 clone 自己的 fork —— 通過 `git commit / push` 把練習進度保存到自己的倉庫裡。
@@ -110,7 +108,8 @@ d2x checker # 練習循環: 編輯 -> 保存 -> 自動偵測 ->
110108
d2x status # 進度總覽
111109
```
112110

113-
> 想單獨跑某一章而不經過 d2x? 直接 `mcpp test -p src/cpp11` 同樣可用。
111+
> 不想經過 d2x? 練習**就是**測試 —— `mcpp test` 印出你的完整進度表(動手前全紅),
112+
> `mcpp test -p src/cpp11` 只跑某一章。
114113
115114
**👉 [更多細節...](https://mcpp-community.github.io/d2mcpp/base/chapter_1.html)**
116115

README.zh.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,10 @@ xlings install d2x mcpp -y # d2x: 练习框架 CLI | mcpp: C++ 构建与测试
7878
d2x install d2mcpp # 下载课程,环境自动配置
7979
cd d2mcpp
8080
mcpp test -p solutions # 验证环境: 52 份参考答案, 应当全绿
81-
mcpp test # 你的进度表: 练习还没做, 此刻全红
8281
```
8382

84-
> `solutions/` 本身就是一个 mcpp 工程, 所以第一条命令会真的编译并运行全部 52 份参考答案 ——
85-
> 全绿即工具链没问题, 这是个不含糊的信号。第二条才是你自己的进度表: 练习**就是**测试,
86-
> 而且发下来时是没做完的, 全红正是起点。
83+
> `solutions/` 本身就是一个 mcpp 工程, 所以这条命令会真的编译并运行全部 52 份参考答案 ——
84+
> 全绿即工具链就绪, 这是个不含糊的信号。
8785
8886
<details>
8987
<summary>可选 - 改用 clone 项目源码的方式</summary>
@@ -94,7 +92,7 @@ mcpp test # 你的进度表: 练习还没做, 此刻全红
9492
git clone https://github.com/mcpp-community/d2mcpp.git # 或你 fork 后的仓库
9593
cd d2mcpp
9694
xlings install -y # 按 .xlings.json 安装固定版本工具链
97-
mcpp test # 同样的环境验证
95+
mcpp test -p solutions # 同样的环境验证
9896
```
9997

10098
> 建议: 先 fork 本仓库再 clone 自己的 fork —— 通过 `git commit / push` 把练习进度保存到自己的仓库里。
@@ -110,7 +108,8 @@ d2x checker # 练习循环: 编辑 -> 保存 -> 自动检测 ->
110108
d2x status # 进度总览
111109
```
112110

113-
> 想单独跑某一章而不经过 d2x? 直接 `mcpp test -p src/cpp11` 同样可用。
111+
> 不想经过 d2x? 练习**就是**测试 —— `mcpp test` 打印你的完整进度表(动手前全红),
112+
> `mcpp test -p src/cpp11` 只跑某一章。
114113
115114
**👉 [更多细节...](https://mcpp-community.github.io/d2mcpp/base/chapter_1.html)**
116115

book/en/src/README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,10 @@ xlings install d2x mcpp -y # d2x: exercise framework CLI | mcpp: C++ build & t
7474
d2x install d2mcpp # download the course, toolchain auto-configured
7575
cd d2mcpp
7676
mcpp test -p solutions # verify the environment: 52 reference answers, all green
77-
mcpp test # your progress table: the exercises, all red for now
7877
```
7978

80-
> `solutions/` is a real mcpp package, so the first command compiles and runs all 52
81-
> reference answers — an unambiguous green tick that your toolchain works. The second
82-
> one is your own progress table: the exercises **are** the tests and they ship
83-
> unfinished, so red is exactly where you start.
79+
> `solutions/` is a real mcpp package, so this compiles and runs all 52 reference
80+
> answers — an unambiguous green tick that your toolchain is ready.
8481
8582
<details>
8683
<summary>optional - start from the git source instead</summary>
@@ -91,7 +88,7 @@ mcpp test # your progress table: the exercises, all red for n
9188
git clone https://github.com/mcpp-community/d2mcpp.git # or your fork
9289
cd d2mcpp
9390
xlings install -y # toolchain pinned by .xlings.json
94-
mcpp test # same environment check
91+
mcpp test -p solutions # same environment check
9592
```
9693

9794
> Tip: fork this repo and clone your fork — `git commit / push` keeps your practice progress in your own repository.
@@ -107,7 +104,9 @@ d2x checker # practice loop: edit -> save -> auto-check -> adva
107104
d2x status # progress overview
108105
```
109106

110-
> Want to run a single chapter without d2x? `mcpp test -p src/cpp11` works too.
107+
> Prefer plain mcpp? The exercises **are** the tests — `mcpp test` prints your whole
108+
> progress table (all red until you start), and `mcpp test -p src/cpp11` runs a single
109+
> chapter.
111110
112111
**👉 [more details...](https://mcpp-community.github.io/d2mcpp/en/base/chapter_1.html)**
113112

book/en/src/base/chapter_1.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,14 @@ d2x install d2mcpp
5050

5151
### Verify the environment
5252

53-
> Run the full test suite once inside the project to confirm the toolchain works
53+
> Run the reference answers once inside the project to confirm the toolchain works
5454
5555
```bash
5656
cd d2mcpp
5757
mcpp test -p solutions # verify the environment: 52 reference answers, all green
58-
mcpp test # your progress table: the exercises, all red for now
5958
```
6059

61-
> `solutions/` is a real mcpp package (`solutions/mcpp.toml` + `solutions/tests/`), so the first command actually compiles and runs all 52 reference answers — green means your toolchain is fine. The second is your own progress table: the exercises **are** the tests and they ship unfinished, so red is exactly where you start.
60+
> `solutions/` is a real mcpp package (`solutions/mcpp.toml` + `solutions/tests/`), so this command actually compiles and runs all 52 reference answers — green means your toolchain is ready.
6261
>
6362
> An answer and its exercise are paired by their `tests/`-relative path:
6463
> `solutions/tests/cpp11/00-auto-and-decltype/0.cpp` ←→ `src/cpp11/tests/00-auto-and-decltype/0.cpp`.
@@ -101,6 +100,7 @@ d2x status
101100
> Every C++ standard directory is a real mcpp project and the exercises are its tests/ — you can practice with plain mcpp, no d2x involved:
102101
103102
```bash
103+
mcpp test # your whole progress table (all red before you start)
104104
mcpp test -p src/en/cpp11 # progress table for the whole cpp11 section
105105
mcpp test -p src/en/cpp11 03-trailing # run only exercises matching the name
106106
```

book/src/README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,10 @@ xlings install d2x mcpp -y # d2x: 练习框架 CLI | mcpp: C++ 构建与测试
7474
d2x install d2mcpp # 下载课程,环境自动配置
7575
cd d2mcpp
7676
mcpp test -p solutions # 验证环境: 52 份参考答案, 应当全绿
77-
mcpp test # 你的进度表: 练习还没做, 此刻全红
7877
```
7978

80-
> `solutions/` 本身就是一个 mcpp 工程, 所以第一条命令会真的编译并运行全部 52 份参考答案 ——
81-
> 全绿即工具链没问题, 这是个不含糊的信号。第二条才是你自己的进度表: 练习**就是**测试,
82-
> 而且发下来时是没做完的, 全红正是起点。
79+
> `solutions/` 本身就是一个 mcpp 工程, 所以这条命令会真的编译并运行全部 52 份参考答案 ——
80+
> 全绿即工具链就绪, 这是个不含糊的信号。
8381
8482
<details>
8583
<summary>可选 - 改用 clone 项目源码的方式</summary>
@@ -90,7 +88,7 @@ mcpp test # 你的进度表: 练习还没做, 此刻全红
9088
git clone https://github.com/mcpp-community/d2mcpp.git # 或你 fork 后的仓库
9189
cd d2mcpp
9290
xlings install -y # 按 .xlings.json 安装固定版本工具链
93-
mcpp test # 同样的环境验证
91+
mcpp test -p solutions # 同样的环境验证
9492
```
9593

9694
> 建议: 先 fork 本仓库再 clone 自己的 fork —— 通过 `git commit / push` 把练习进度保存到自己的仓库里。
@@ -106,7 +104,8 @@ d2x checker # 练习循环: 编辑 -> 保存 -> 自动检测 ->
106104
d2x status # 进度总览
107105
```
108106

109-
> 想单独跑某一章而不经过 d2x? 直接 `mcpp test -p src/cpp11` 同样可用。
107+
> 不想经过 d2x? 练习**就是**测试 —— `mcpp test` 打印你的完整进度表(动手前全红),
108+
> `mcpp test -p src/cpp11` 只跑某一章。
110109
111110
**👉 [更多细节...](https://mcpp-community.github.io/d2mcpp/base/chapter_1.html)**
112111

book/src/base/chapter_1.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,14 @@ d2x install d2mcpp
5050

5151
### 验证环境
5252

53-
> 进入项目目录后跑一遍全量测试, 确认工具链是通的
53+
> 进入项目目录后跑一遍参考答案, 确认工具链是通的
5454
5555
```bash
5656
cd d2mcpp
5757
mcpp test -p solutions # 验证环境: 52 份参考答案, 应当全绿
58-
mcpp test # 你的进度表: 练习还没做, 此刻全红
5958
```
6059

61-
> `solutions/` 本身就是一个 mcpp 工程(`solutions/mcpp.toml` + `solutions/tests/`), 所以第一条命令会真的编译并运行全部 52 份参考答案 —— 全绿即工具链没问题。第二条才是你自己的进度表: 练习**就是**测试, 而且发下来时是没做完的, 全红正是起点
60+
> `solutions/` 本身就是一个 mcpp 工程(`solutions/mcpp.toml` + `solutions/tests/`), 所以这条命令会真的编译并运行全部 52 份参考答案 —— 全绿即工具链就绪
6261
>
6362
> 答案与练习的对应关系就是 `tests/` 下的相对路径:
6463
> `solutions/tests/cpp11/00-auto-and-decltype/0.cpp` ←→ `src/cpp11/tests/00-auto-and-decltype/0.cpp`
@@ -101,6 +100,7 @@ d2x status
101100
> 每个 C++ 标准目录都是真实的 mcpp 工程,练习就是它的 tests/——不经过 d2x,直接用 mcpp 也能练:
102101
103102
```bash
103+
mcpp test # 你的完整进度表(动手前全红, 那就是起点)
104104
mcpp test -p src/cpp11 # 整个 cpp11 的进度表(哪题绿哪题红)
105105
mcpp test -p src/cpp11 03-trailing # 只跑名字匹配的练习
106106
```

0 commit comments

Comments
 (0)