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

Maybe clean tests #3

Open
1 task done
ringabout opened this issue Nov 25, 2020 · 4 comments
Open
1 task done

Maybe clean tests #3

ringabout opened this issue Nov 25, 2020 · 4 comments

Comments

@ringabout
Copy link
Owner

ringabout commented Nov 25, 2020

nim-lang#16096 (comment)
nim-lang#16101 (comment)

@timotheecour
Copy link

timotheecour commented Nov 25, 2020

git diff --color-moved --color-moved-ws=ignore-all-space cbc793b^..cbc793b | grep '\binclude\b'

+include parsecsv
+include stats
+include uri

=> use similar technique to transform those into import

@timotheecour
Copy link

timotheecour commented Nov 25, 2020

  • another thing would be a giant s/assert/doAssert/ under tests/ ; curious which cases would need to stay as assert, besides maybe a test that actually tests for assert (eg in tests/assert/tassert.nim or such)
    (refs: misc cleanups timotheecour/Nim#64 (comment))

@ringabout
Copy link
Owner Author

ringabout commented Nov 27, 2020

  • clean unittest style

@timotheecour
Copy link

timotheecour commented Nov 27, 2020

clean unittest style

can you clarify what you mean?
eg,

suite "Bacon":
  test ">:)":
    check(foo == bar)

I'd write it as:

block: # Bacon
  check foo == bar

(but not necessarily doAssert foo == bar)

which adhers to the principle of: "only print something if there's something wrong", unlike suite "Bacon": which outputs [suite] Bacon regardless if test pass/failed, and is more informative than doAssert foo == bar when test fails

ringabout pushed a commit that referenced this issue May 15, 2023
tlsEmulation:on under NetBSD-10Beta and NetBSD-current produces an executable which crashes immediately as follows:

Core was generated by `koch'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000000000047b4c2 in nimZeroMem ()
(gdb) bt
#0  0x000000000047b4c2 in nimZeroMem ()
#1  0x00000000004897b2 in threadVarAlloc__system_2162 ()
#2  0x000000000048980e in initThreadVarsEmulation ()
#3  0x0000000000489848 in PreMain ()
#4  0x000000000048986a in NimMain ()
#5  0x00000000004898a9 in main ()

I can't speak about the other BSDs.
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

No branches or pull requests

2 participants