aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--testing/templates/operators.html24
-rw-r--r--testing/tests/operators.rs2
2 files changed, 25 insertions, 1 deletions
diff --git a/testing/templates/operators.html b/testing/templates/operators.html
index 750f0aa..1488b9a 100644
--- a/testing/templates/operators.html
+++ b/testing/templates/operators.html
@@ -7,3 +7,27 @@
{% if a % c == b -%}
mod
{%- endif -%}
+{% if a + b == c -%}
+ add
+{%- endif -%}
+{% if a << b == c -%}
+ rsh
+{%- endif -%}
+{% if c >> b == a -%}
+ lsh
+{%- endif -%}
+{% if a & b == b -%}
+ band
+{%- endif -%}
+{% if b ^ c == a + c -%}
+ bxor
+{%- endif -%}
+{% if b | c == a + c -%}
+ bor
+{%- endif -%}
+{% if a == b && a + b == c -%}
+ and
+{%- endif -%}
+{% if a == c || a == b -%}
+ or
+{%- endif -%}
diff --git a/testing/tests/operators.rs b/testing/tests/operators.rs
index d58492e..73745f0 100644
--- a/testing/tests/operators.rs
+++ b/testing/tests/operators.rs
@@ -30,5 +30,5 @@ struct OperatorsTemplate {
#[test]
fn test_operators() {
let t = OperatorsTemplate { a: 1, b: 1, c: 2 };
- assert_eq!(t.render(), "muldivmod");
+ assert_eq!(t.render(), "muldivmodaddrshlshbandbxorborandor");
}