Crate ra_ap_test_utils[−][src]
Assorted testing utilities.
Most notable things are:
- Rich text comparison, which outputs a diff.
- Extracting markup (mainly,
$0
markers) out of fixture strings. - marks (see the eponymous module).
Modules
bench_fixture | Generates large snippets of Rust code for usage in the benchmarks. |
mark | This module implements manually tracked test coverage, which is useful for quickly finding a test responsible for testing a particular bit of code. |
Macros
_check | |
_hit | |
assert_eq_text | Asserts that two strings are equal, otherwise displays a rich diff between them. |
Structs
Fixture |
Enums
RangeOrOffset |
Constants
CURSOR_MARKER | |
ESCAPED_CURSOR_MARKER |
Functions
__diff | |
add_cursor | Inserts |
bench | Utility for writing benchmark tests. |
extract_annotations | Extracts |
extract_offset | Infallible version of |
extract_range | Infallible version of |
extract_range_or_offset | Extracts |
extract_tags | Extracts ranges, marked with |
find_mismatch | Compares JSON object for approximate equality.
You can use |
format_diff | |
lines_match | Compare a line with an expected pattern. |
project_dir | Returns the path to the root directory of |
skip_slow_tests | Returns |
Type Definitions
FxHashMap | Type alias for a hashmap using the |