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

println call in nargo tests should start on a new line #2913

Closed
vezenovm opened this issue Sep 29, 2023 · 3 comments
Closed

println call in nargo tests should start on a new line #2913

vezenovm opened this issue Sep 29, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers nargo Noir's CLI development tool

Comments

@vezenovm
Copy link
Contributor

Problem

When running a test like such:

#[test]
fn test_multiple_prints()
{
    dep::std::println("hello");
    dep::std::println("world");
}

We will get this output:

[testing] Testing test_multiple_prints... "hello"
"world"

Happy Case

"hello" should start on the line after the test name.

[testing] Testing test_multiple_prints... 
"hello"
"world"

Alternatives Considered

N/A

Additional Context

No response

Would you like to submit a PR for this Issue?

No

Support Needs

No response

@vezenovm vezenovm added enhancement New feature or request good first issue Good for newcomers nargo Noir's CLI development tool P-LOW labels Sep 29, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Sep 29, 2023
@yekxp
Copy link

yekxp commented Sep 30, 2023

Hello, my name is Jakub and I am a student of Technical University in Kosice and software developer in Siemens Healthineers and I would be very happy if I could work on this issue. It would be the part of the course where we have to help a project on GitHub. Could you assign me to it, please?

@vezenovm
Copy link
Contributor Author

vezenovm commented Oct 2, 2023

Hi @yekxp! For sure, thank you for taking this on.

AztecBot pushed a commit that referenced this issue Dec 19, 2023
- Update the dapp tutorial testing page to not reference the npm setup
- Update the testing tutorials page to mention the debug options on
waiting for a transaction

closes #2913 

# Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if
the PR is ready to merge.
- [ ] If the pull request requires a cryptography review (e.g.
cryptographic algorithm implementations) I have added the 'crypto' tag.
- [ ] I have reviewed my diff in github, line by line and removed
unexpected formatting changes, testing logs, or commented-out code.
- [ ] Every change is related to the PR description.
- [ ] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to relevant issues (if any exist).

---------

Co-authored-by: Cat McGee <helloworld@mcgee.cat>
Co-authored-by: Jan Beneš <janbenes1234@gmail.com>
@asterite
Copy link
Collaborator

nargo test output changed a bit recently. If you run it with --show-output for the example above, this is the output:

[one] Running 1 test function
[one] Testing test_multiple_prints... ok
--- test_multiple_prints stdout ---
hello
world
-----------------------------------
[one] 1 test passed

So the output already starts in separate lines 🎉

@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers nargo Noir's CLI development tool
Projects
Archived in project
Development

No branches or pull requests

4 participants