-
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detect snapshot names from function names (#213)
We used to detect the snapshot names form the current thread. This has been very unrealiable in a lot of cases. This changes the behavior so that the function name is used instead by using `std::any::type_name`. This does change behavior slightly but most users should not notice this change except if they relied on helper functions. In that case using a macro is a better solution most likely. Refs #127 Fixes #105
- Loading branch information
Showing
8 changed files
with
42 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...s/snapshots/test_inline__something-2.snap → ...inline__unnamed_thread_single_line-2.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
source: tests/test_inline.rs | ||
assertion_line: 41 | ||
expression: "\"Testing-thread-2\"" | ||
|
||
--- | ||
Testing-thread-2 |
2 changes: 2 additions & 0 deletions
2
tests/snapshots/test_inline__something.snap → ...t_inline__unnamed_thread_single_line.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
source: tests/test_inline.rs | ||
assertion_line: 40 | ||
expression: "\"Testing-thread\"" | ||
|
||
--- | ||
Testing-thread |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters