diff options
| author | Roee Shapira <35409124+5c077m4n@users.noreply.github.com> | 2020-11-21 20:39:57 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-21 19:39:57 +0100 |
| commit | fd1f1ce697fae94101e971ff059aed9c33c379fd (patch) | |
| tree | 92de576efdcfb5a9e8aab81626ee7372584db6be /src/tests/fixtures | |
| parent | refactor(structure): Change structure of `/tmp` directory (#62) (diff) | |
| download | sl0ppij-fd1f1ce697fae94101e971ff059aed9c33c379fd.tar.gz sl0ppij-fd1f1ce697fae94101e971ff059aed9c33c379fd.tar.xz sl0ppij-fd1f1ce697fae94101e971ff059aed9c33c379fd.zip | |
fix(layout): total layout percent 100 validation (#57)
* Fix for issue #52
* Added missing fixtures.
* Added missing validation.
* Moved layout creation and validation to the Layout struct.
* Ran cargo fmt.
* Added creation of tmp folder if needed.
* Code review edit.
* Code review edit.
* Fancied code up.
* PR request change.
* PR code review.
* Merge from upstream/main.
* Merge from upstream/main.
Diffstat (limited to 'src/tests/fixtures')
| -rw-r--r-- | src/tests/fixtures/layouts/parts-total-less-than-100-percent.yaml | 16 | ||||
| -rw-r--r-- | src/tests/fixtures/layouts/parts-total-more-than-100-percent.yaml | 16 |
2 files changed, 32 insertions, 0 deletions
diff --git a/src/tests/fixtures/layouts/parts-total-less-than-100-percent.yaml b/src/tests/fixtures/layouts/parts-total-less-than-100-percent.yaml new file mode 100644 index 00000000..e1a1a607 --- /dev/null +++ b/src/tests/fixtures/layouts/parts-total-less-than-100-percent.yaml @@ -0,0 +1,16 @@ +--- + direction: Horizontal + parts: + - direction: Vertical + parts: + - direction: Horizontal + split_size: + Percent: 20 + - direction: Horizontal + split_size: + Percent: 50 + split_size: + Percent: 80 + - direction: Vertical + split_size: + Percent: 20 diff --git a/src/tests/fixtures/layouts/parts-total-more-than-100-percent.yaml b/src/tests/fixtures/layouts/parts-total-more-than-100-percent.yaml new file mode 100644 index 00000000..33d94225 --- /dev/null +++ b/src/tests/fixtures/layouts/parts-total-more-than-100-percent.yaml @@ -0,0 +1,16 @@ +--- + direction: Horizontal + parts: + - direction: Vertical + parts: + - direction: Horizontal + split_size: + Percent: 20 + - direction: Horizontal + split_size: + Percent: 90 + split_size: + Percent: 80 + - direction: Vertical + split_size: + Percent: 20 |
