-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
63a78b9
commit fd15240
Showing
9 changed files
with
92 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: validate | ||
|
||
on: [push, workflow_dispatch] | ||
|
||
# TODO: add linting | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: CarbonSmasher/packtest_runner@9d13d673bf9d3f2fad2b833d036e5e12ff65e056 | ||
with: | ||
packs: 'datapacks/omega-flowey' |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
datapacks/omega-flowey/data/utils/tests/math/max.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# @batch utils:math | ||
|
||
# setup | ||
data remove storage utils:math.max a | ||
data remove storage utils:math.max b | ||
data remove storage utils:math.max out | ||
scoreboard players reset * | ||
function omega-flowey:setup | ||
|
||
# cases | ||
data merge storage utils:math.max { a: 10, b: 10 } | ||
function utils:math/max | ||
execute store result score #utils:math.max math.0 run data get storage utils:math.max out | ||
|
||
assert score #utils:math.max math.0 matches 10 | ||
|
||
data merge storage utils:math.max { a: 0, b: 1 } | ||
function utils:math/max | ||
execute store result score #utils:math.max math.0 run data get storage utils:math.max out | ||
|
||
assert score #utils:math.max math.0 matches 1 | ||
|
||
data merge storage utils:math.max { a: 2, b: 1 } | ||
function utils:math/max | ||
execute store result score #utils:math.max math.0 run data get storage utils:math.max out | ||
|
||
assert score #utils:math.max math.0 matches 2 |
27 changes: 27 additions & 0 deletions
27
datapacks/omega-flowey/data/utils/tests/math/min.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# @batch utils:math | ||
|
||
# setup | ||
data remove storage utils:math.min a | ||
data remove storage utils:math.min b | ||
data remove storage utils:math.min out | ||
scoreboard players reset * | ||
function omega-flowey:setup | ||
|
||
# cases | ||
data merge storage utils:math.min { a: 10, b: 10 } | ||
function utils:math/min | ||
execute store result score #utils:math.min math.0 run data get storage utils:math.min out | ||
|
||
assert score #utils:math.min math.0 matches 10 | ||
|
||
data merge storage utils:math.min { a: 0, b: 1 } | ||
function utils:math/min | ||
execute store result score #utils:math.min math.0 run data get storage utils:math.min out | ||
|
||
assert score #utils:math.min math.0 matches 0 | ||
|
||
data merge storage utils:math.min { a: 2, b: 1 } | ||
function utils:math/min | ||
execute store result score #utils:math.min math.0 run data get storage utils:math.min out | ||
|
||
assert score #utils:math.min math.0 matches 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters