This repository was archived by the owner on Jun 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 199
Print return values of run tests if type is not boolean. #1231
Closed
Closed
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
18afb26
Add print and assertion options to the run tests.
krk b5cc84a
Revert verifier errors format string.
krk 892a6b0
Implement FromStr for Operator.
krk 5e78a80
Add function name to errors.
krk 0e1b3de
Remove some return keywords.
krk ba49813
Refactor print_only parameter of check into a new print function.
krk 62084b5
Add Value enum to represent parsed values in function_runner.
krk 3405df7
Comment test failing in Windows, issue at #1279.
krk e7d02ea
Fix commented run command in test.
krk 51c2e53
Substitute single line macro "consume".
krk 0c9942c
Remove boolean_to_vec function and simplify its only callsite.
krk 3a57022
Use ConstantData less in parsing test options.
krk 6875284
Remove unnecessary type condition in FunctionRunner.invoke.
krk b076b68
Do not compile method that cannot be run in test.
krk 02d887c
Fix return value count error message.
krk 350c755
Simplify return type check for two I64s.
krk d772f3e
Remove unnecessary trivial_numeric_casts attribute.
krk 7dc5f43
Merge use declarations.
krk 7ec2f56
Remove overflowing_shl.
krk 059ffcc
Mark invoke function as unsafe.
krk 32d94ec
Remove unnecessary return.
krk bd443f8
Add descriptive panic message.
krk 0be5b8d
Reword error message.
krk 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ pub enum CodegenError { | |
| /// | ||
| /// This always represents a bug, either in the code that generated IR for Cranelift, or a bug | ||
| /// in Cranelift itself. | ||
| #[error("Verifier errors")] | ||
| #[error("Verifier errors\n{0}")] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we want to do this (I just learned): #1240 |
||
| Verifier(#[from] VerifierErrors), | ||
|
|
||
| /// An implementation limit was exceeded. | ||
|
|
||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should modify
ConstantDatafor what we are doing; it is designed for constant pool stuff and adding these conversions might make it harder to decouple later from test functionality. Why not build our ownValueenum:I wouldn't worry too much about 128-bit types just yet until we get the basics in place. Then I would add a way to parse into this (using Rust's
FromStr/parse) from text and a type:Then I would
#[derive(Eq, PartialEq)]on the enum so we can compare them to each other and add someFromimplementations so thatinvokecan get the raw value (e.g. f32), wrap it in aValuewithValue::from(orinto), and then compare it against the parsedValues that we get from the comments. (Hopefully that explains the other comments I've made; this isn't the only way to do things but it doesn't involve touching other components likeConstantDataand it seems natural to Rust--from the little I know about Rust).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me change my tune a bit: I now see down below that you implemented some parsing logic in
parser.rs; if you want to use that for theFromStronValueinstead of the built-in Rust parsing that seems OK. We could use methods likeParser::new(text).match_bool(...)instead andValuemay have to use different inner types (e.g.F32(Ieee32)instead ofF32(f32))--but that seems fine. The underlying thing that I'm getting at is that we likely don't want to touchConstantDatain this case.