-
-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mycpp] Test case for invalid format strings
mycpp/demo: big union demo! Probably won't use this style.
- Loading branch information
Andy C
committed
Dec 20, 2022
1 parent
bf828c9
commit a4607aa
Showing
2 changed files
with
205 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env python2 | ||
""" | ||
invalid_format_strings.py | ||
""" | ||
from __future__ import print_function | ||
|
||
def run_tests(): | ||
# type: () -> None | ||
|
||
x = 33 | ||
|
||
print('x = %z' % x) | ||
|
||
# TODO: this doesn't fail at translate time | ||
|
||
# With StrFormat(), it will make it to C++ runtime, past C++ compile time | ||
#print('x = %x' % x) | ||
|
||
# Similarly for '%-2d' I believe | ||
|