Skip to content
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

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

Conversation

vcanumalla
Copy link
Collaborator

@vcanumalla vcanumalla commented Jul 3, 2021

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.

@vcanumalla vcanumalla marked this pull request as ready for review July 13, 2021 03:29
Copy link
Owner

@gussmith23 gussmith23 left a 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 {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
macro_rules! codegen_test {
/// <Need documentation here!>
macro_rules! codegen_test {

Copy link
Owner

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;
Copy link
Owner

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"?

@gussmith23
Copy link
Owner

I'm going to hold off on further comments until after our meeting today.

@vcanumalla vcanumalla marked this pull request as draft September 1, 2021 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants