Skip to content

Commit

Permalink
test: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-jerry-ye committed Mar 25, 2024
1 parent 11a071a commit ffaa48f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mdlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
run: /bin/bash -c "$(curl -fsSL https://cli.moonbitlang.com/ubuntu_x86_64_moon_setup.sh)"

- name: Get changed files
id: changed-fiels
id: changed-files
uses: tj-actions/changed-files@v43

- name: Run mdlint
Expand Down
12 changes: 6 additions & 6 deletions course2/lec2_script.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ fn num_water_bottles(num_bottles: Int, num_exchange: Int) -> Int {
// 条件表达式
if num_bottles >= num_exchange {
// 数据绑定
num_bottles := num_bottles - num_exchange + 1
num_drunk := num_drunk + num_exchange
let num_bottles = num_bottles - num_exchange + 1
let num_drunk = num_drunk + num_exchange
// 函数运算
consume(num_bottles, num_drunk)
} else {
Expand All @@ -61,11 +61,11 @@ fn num_water_bottles(num_bottles: Int, num_exchange: Int) -> Int {
consume(num_bottles, 0)
}
// 程序入口
fn init {
// 程序测试
test {
// 命令
assert(num_water_bottles(9, 3) == 13)
assert(num_water_bottles(15, 4) == 19)
@assertion.assert_eq(num_water_bottles(9, 3), 13)?
@assertion.assert_eq(num_water_bottles(15, 4), 19)?
}
```

Expand Down

0 comments on commit ffaa48f

Please sign in to comment.