Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sezna authored Dec 3, 2024
1 parent d283223 commit f0a7c89
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion library/qtest/src/Functions.qs
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ function TestCase<'T : Eq + Show>(name : String, test_case : () -> 'T, expected
}
}

export CheckAllTestCases, RunAllTestCases;
export CheckAllTestCases, RunAllTestCases;
8 changes: 4 additions & 4 deletions library/qtest/src/Operations.qs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -78,4 +78,4 @@ operation TestCase<'T : Eq + Show>(name : String, qubits : Qubit[], test_case :
}
}

export CheckAllTestCases, RunAllTestCases;
export CheckAllTestCases, RunAllTestCases;

0 comments on commit f0a7c89

Please sign in to comment.