Files
modeling-app/rust/kcl-lib/tests/boolean_logical_or/unparsed.snap
Nick Cameron a7e09a89ef Improve snapshot testing (#5856)
* Improve snapshot testing

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

---------

Signed-off-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-19 15:06:27 -07:00

36 lines
616 B
Plaintext

---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing boolean_logical_or.kcl
---
aa = true | false
a = if aa {
1
} else {
2
}
assert(a == 1, "left branch of or is true makes the whole expression true")
bb = false | true
b = if bb {
1
} else {
2
}
assert(b == 1, "right branch of or is true makes the whole expression true")
cc = true | true
c = if cc {
1
} else {
2
}
assert(c == 1, "both branches of or are true makes the whole expression true")
dd = false | false
d = if dd {
1
} else {
2
}
assert(d == 2, "both branches of or are false makes the whole expression false")