diff --git a/library/qtest/src/Functions.qs b/library/qtest/src/Functions.qs index c57dd275c3..c5cf1d0bcc 100644 --- a/library/qtest/src/Functions.qs +++ b/library/qtest/src/Functions.qs @@ -57,4 +57,4 @@ function TestCase<'T : Eq + Show>(name : String, test_case : () -> 'T, expected } } -export CheckAllTestCases, RunAllTestCases; +export CheckAllTestCases, RunAllTestCases; \ No newline at end of file diff --git a/library/qtest/src/Operations.qs b/library/qtest/src/Operations.qs index 4f3ce5c3c1..c559b8ce66 100644 --- a/library/qtest/src/Operations.qs +++ b/library/qtest/src/Operations.qs @@ -19,9 +19,9 @@ import Std.Arrays.Mapped, Std.Arrays.All; /// /// # Example /// ```qsharp -/// CheckAllTestCases([("Should return 42", () => 42, 42)]); +/// CheckAllTestCases([("0b0001 == 1", 4, (qs) => X(qs[0]), (qs) => MeasureSignedInteger(qs, 4), 1)]); /// ``` -operation CheckAllTestCases<'T : Eq + Show>(test_cases : (String, Int, (Qubit[]) => (), (Qubit[]) => 'T, 'T)[]) : Bool { +operation CheckAllTestCases<'T : Eq + Show>(test_cases : (String, Int, Qubit[] => (), Qubit[] => 'T, 'T)[]) : Bool { let test_results = RunAllTestCases(test_cases); OutputMessage(test_results); @@ -42,7 +42,7 @@ operation CheckAllTestCases<'T : Eq + Show>(test_cases : (String, Int, (Qubit[]) /// /// # Example /// ```qsharp -/// RunAllTestCases([("Should return 42", () => 42, 42)]); +/// RunAllTestCases([("0b0001 == 1", 4, (qs) => X(qs[0]), (qs) => MeasureSignedInteger(qs, 4), 1)]); /// ``` operation RunAllTestCases<'T : Eq + Show>(test_cases : (String, Int, (Qubit[]) => (), (Qubit[]) => 'T, 'T)[]) : TestCaseResult[] { let num_tests = Length(test_cases); @@ -78,4 +78,4 @@ operation TestCase<'T : Eq + Show>(name : String, qubits : Qubit[], test_case : } } -export CheckAllTestCases, RunAllTestCases; +export CheckAllTestCases, RunAllTestCases; \ No newline at end of file