-
Notifications
You must be signed in to change notification settings - Fork 10
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
Codegen Test Macro #114
base: main
Are you sure you want to change the base?
Codegen Test Macro #114
Conversation
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's pair program on this PR today in our meeting -- things look good, but I think we can clean up the macro implementation a bit!
@@ -1938,234 +1938,202 @@ mod tests { | |||
} | |||
relay_outputs | |||
} | |||
macro_rules! codegen_test { |
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.
macro_rules! codegen_test { | |
/// <Need documentation here!> | |
macro_rules! codegen_test { |
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.
Please add this newline, and add a docstring for your new macro!
src/codegen.rs
Outdated
macro_rules! codegen_test { | ||
($input_vec: expr, $code_expr: expr, $code_tup: expr, $ground_truth : expr, $c_code : expr) => { | ||
let mut map: HashMap<String, Vec<usize>> = HashMap::default(); | ||
let shape_vec = $input_vec; |
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.
Is this really a "shape vec"? Or is a vector of (name, value) pairs? Maybe just call it "environment" or "env"?
I'm going to hold off on further comments until after our meeting today. |
cf78b5c
to
0251c27
Compare
1b223e6
to
b059efd
Compare
Aims to solve issue #34 at least partially. Currently in stage of rewriting the tests, and adding additional cases for the macro to cover. Still needs a good amount of drone work.