-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add tests for basic_format_parse_context #1597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5191e21
Noralize next_arg_id
miscco 6a4ff26
Add precondition check to basic_format_parse_context::advance_to and …
miscco be1afc0
ensure basic_format_parse_context::check_arg_id is not a constant exp…
miscco ae417d7
Add tests for basic_format_parse_context
miscco cbea0a5
Fix constant expression check
miscco ba63570
Not not
miscco 816fe40
windsdk is bad
miscco 5485658
Address review comments
miscco e938cfa
Use a non constexpr function call with a better name
miscco 2ed5591
Reverse the polarity
StephanTLavavej File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Copyright (c) Microsoft Corporation. | ||
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
|
||
| RUNALL_INCLUDE ..\strict_winsdk_concepts_matrix.lst |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
|
||
| #define _CONTAINER_DEBUG_LEVEL 1 | ||
|
|
||
| #include <assert.h> | ||
| #include <format> | ||
| #include <string_view> | ||
|
|
||
| #include <test_death.hpp> | ||
| using namespace std; | ||
|
|
||
| void test_case_advance_no_range() { | ||
| const auto format_string = "First {} and second {} and third {}"sv; | ||
| const auto other_format_string = "something"sv; | ||
| basic_format_parse_context context{format_string}; | ||
| context.advance_to(other_format_string.begin()); | ||
| } | ||
|
|
||
| int main(int argc, char* argv[]) { | ||
| std_testing::death_test_executive exec; | ||
|
|
||
| #if _ITERATOR_DEBUG_LEVEL != 0 | ||
| exec.add_death_tests({ | ||
| test_case_advance_no_range, | ||
| }); | ||
| #endif // _ITERATOR_DEBUG_LEVEL != 0 | ||
|
|
||
| return exec.run(argc, argv); | ||
| } |
2 changes: 1 addition & 1 deletion
2
tests/std/tests/P0645R10_text_formatting_parse_contexts/env.lst
This file contains hidden or 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,4 +1,4 @@ | ||
| # Copyright (c) Microsoft Corporation. | ||
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
|
||
| RUNALL_INCLUDE ..\concepts_matrix.lst | ||
| RUNALL_INCLUDE ..\strict_winsdk_concepts_matrix.lst |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.