Do not unnecessarily use raw strings.

This commit is contained in:
Stephen Chung
2021-04-20 12:01:35 +08:00
parent a186eb8d97
commit 0f66c67f82
29 changed files with 100 additions and 103 deletions

View File

@@ -33,7 +33,7 @@ fn test_switch() -> Result<(), Box<EvalAltResult>> {
assert_eq!(
engine.eval_with_scope::<INT>(
&mut scope,
r"
"
let y = [1, 2, 3];
switch y {
@@ -50,7 +50,7 @@ fn test_switch() -> Result<(), Box<EvalAltResult>> {
assert_eq!(
engine.eval_with_scope::<INT>(
&mut scope,
r"
"
let y = #{a:1, b:true, c:'x'};
switch y {
@@ -98,7 +98,7 @@ fn test_switch_condition() -> Result<(), Box<EvalAltResult>> {
assert_eq!(
engine.eval_with_scope::<INT>(
&mut scope,
r"
"
switch x / 2 {
21 if x > 40 => 1,
0 if x < 100 => 2,
@@ -113,7 +113,7 @@ fn test_switch_condition() -> Result<(), Box<EvalAltResult>> {
assert_eq!(
engine.eval_with_scope::<INT>(
&mut scope,
r"
"
switch x / 2 {
21 if x < 40 => 1,
0 if x < 100 => 2,
@@ -128,7 +128,7 @@ fn test_switch_condition() -> Result<(), Box<EvalAltResult>> {
assert!(matches!(
*engine
.compile(
r"
"
switch x {
21 if x < 40 => 1,
21 if x == 10 => 10,