diff options
Diffstat (limited to 'testing')
-rw-r--r-- | testing/templates/operators.html | 9 | ||||
-rw-r--r-- | testing/tests/operators.rs | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/testing/templates/operators.html b/testing/templates/operators.html index ea22546..020126b 100644 --- a/testing/templates/operators.html +++ b/testing/templates/operators.html @@ -46,3 +46,12 @@ {%- else -%} f {%- endif %} +{% if a * c > b -%} + mul +{%- endif %} +{% if c / c == a -%} + div +{%- endif %} +{% if a % c == b -%} + mod +{%- endif %} diff --git a/testing/tests/operators.rs b/testing/tests/operators.rs index 0154118..240fd52 100644 --- a/testing/tests/operators.rs +++ b/testing/tests/operators.rs @@ -15,5 +15,5 @@ struct OperatorsTemplate { #[test] fn test_operators() { let t = OperatorsTemplate { a: 1, b: 1, c: 2 }; - assert_eq!(t.render(), "tf\ntf\ntf\ntf\ntf\ntf\n"); + assert_eq!(t.render(), "tf\ntf\ntf\ntf\ntf\ntf\nmul\ndiv\nmod\n"); } |