Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Manvi-Agrawal committed Jun 8, 2024
1 parent ad1e573 commit 680cd47
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions compiler/qsc_linter/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fn multiple_lints() {
help: "remove the extra parentheses for clarity",
},
SrcLint {
source: "operation RunProgram() : Unit {\n let x = ((1 + 2)) / 0;;;;\n }",
source: "RunProgram",
level: Warn,
message: "operation does not contain any quantum operations",
help: "this callable can be declared as a function instead",
Expand Down Expand Up @@ -151,7 +151,7 @@ fn needless_operation_lambda_operations() {
&expect![[r#"
[
SrcLint {
source: "(a) => a + 1",
source: "",
level: Warn,
message: "operation does not contain any quantum operations",
help: "this callable can be declared as a function instead",
Expand All @@ -178,7 +178,7 @@ fn needless_operation_non_empty_op_and_no_specialization() {
&expect![[r#"
[
SrcLint {
source: "operation RunProgram() : Unit {\n let x = 2;\n }",
source: "RunProgram",
level: Warn,
message: "operation does not contain any quantum operations",
help: "this callable can be declared as a function instead",
Expand All @@ -202,7 +202,7 @@ fn needless_operation_non_empty_op_and_specialization() {
&expect![[r#"
[
SrcLint {
source: "operation Run(target : Qubit) : Unit is Adj {\n body ... {\n Message(\"hi\");\n }\n adjoint self;\n}",
source: "Run",
level: Warn,
message: "operation does not contain any quantum operations",
help: "this callable can be declared as a function instead",
Expand Down Expand Up @@ -256,7 +256,7 @@ fn needless_operation_partial_application() {
&expect![[r#"
[
SrcLint {
source: "operation PartialApplication(q1 : Qubit) : Qubit => Unit {\n return PrepareBellState(q1, _);\n}",
source: "PartialApplication",
level: Warn,
message: "operation does not contain any quantum operations",
help: "this callable can be declared as a function instead",
Expand Down

0 comments on commit 680cd47

Please sign in to comment.