Skip to content

Commit

Permalink
fix typos in descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
sezna committed Nov 18, 2024
1 parent 2b4fe16 commit ecb04fe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions library/qtest/src/Functions.qs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Std.Arrays.Mapped, Std.Arrays.All;
/// test results instead of printing out to output.
///
/// # Input
/// Takes a list of test cases. A test case is a tuple of `(String, () -> T, 'T)`, where
/// Takes a list of test cases. A test case is a tuple of `(String, () -> 'T, 'T)`, where
/// the first String is the name of the test, the function is the test case itself, and the
/// final element of the tuple is the expected return value from the test case.
///
Expand All @@ -33,7 +33,7 @@ function CheckAllTestCases<'T : Eq + Show>(test_cases : (String, () -> 'T, 'T)[]
/// This is a good alternative to `CheckAllTestCases` when you want custom output based on the results of your tests,
/// or more control over how test results are rendered.
/// # Input
/// Takes a list of test cases. A test case is a tuple of `(String, () -> T, 'T)`, where
/// Takes a list of test cases. A test case is a tuple of `(String, () -> 'T, 'T)`, where
/// the first String is the name of the test, the function is the test case itself, and the
/// final element of the tuple is the expected return value from the test case.
///
Expand All @@ -57,4 +57,4 @@ function TestCase<'T : Eq + Show>(name : String, test_case : () -> 'T, expected
}
}

export CheckAllTestCases, RunAllTestCases;
export CheckAllTestCases, RunAllTestCases;
10 changes: 5 additions & 5 deletions library/qtest/src/Operations.qs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import Std.Arrays.Mapped, Std.Arrays.All;
/// test results instead of printing out to output.
///
/// # Input
/// Takes a list of test cases. A test case is a tuple of `(String, () -> T, 'T)`, where
/// Takes a list of test cases. A test case is a tuple of `(String, () => 'T, 'T)`, where
/// the first String is the name of the test, the function is the test case itself, and the
/// final element of the tuple is the expected return value from the test case.
///
/// # Example
/// ```qsharp
/// CheckAllTestCases([("Should return 42", () -> 42, 42)]);
/// CheckAllTestCases([("Should return 42", () => 42, 42)]);
/// ```
operation CheckAllTestCases<'T : Eq + Show>(test_cases : (String, Int, (Qubit[]) => (), (Qubit[]) => 'T, 'T)[]) : Bool {
let test_results = RunAllTestCases(test_cases);
Expand All @@ -35,13 +35,13 @@ operation CheckAllTestCases<'T : Eq + Show>(test_cases : (String, Int, (Qubit[])
/// This is a good alternative to `CheckAllTestCases` when you want custom output based on the results of your tests,
/// or more control over how test results are rendered.
/// # Input
/// Takes a list of test cases. A test case is a tuple of `(String, () -> T, 'T)`, where
/// Takes a list of test cases. A test case is a tuple of `(String, () => 'T, 'T)`, where
/// the first String is the name of the test, the function is the test case itself, and the
/// final element of the tuple is the expected return value from the test case.
///
/// # Example
/// ```qsharp
/// RunAllTestCases([("Should return 42", () -> 42, 42)]);
/// RunAllTestCases([("Should return 42", () => 42, 42)]);
/// ```
operation RunAllTestCases<'T : Eq + Show>(test_cases : (String, Int, (Qubit[]) => (), (Qubit[]) => 'T, 'T)[]) : TestCaseResult[] {
let num_tests = Length(test_cases);
Expand Down Expand Up @@ -77,4 +77,4 @@ operation TestCase<'T : Eq + Show>(name : String, qubits : Qubit[], test_case :
}
}

export CheckAllTestCases, RunAllTestCases;
export CheckAllTestCases, RunAllTestCases;

0 comments on commit ecb04fe

Please sign in to comment.