-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
src: add c++ test coverage #1193
Comments
It is very interesting thing. What I am mostly curious about is - how much of the stuff will we be able to test within the C++? It seems to me that many if not most of the code is tightly bound to the JS. The second question is even more interesting :) Do we want it to be cross-platform? Or can we do some raw |
+1 for this in general, though |
That's why I predict there will be a fair bit of churn, to break out the meat from the glue code. I think it's alright when tests set up a VM where it makes sense.
It should be cross-platform, with the platform-dependent bits guarded by #ifdef statements. Just like libuv, really. :-) |
Sounds awesome! Go ahead with it :) |
Good idea indeed. Is there perhaps a |
I don't think there is one currently but it should be pretty easy to get it gypified. gtest core is only a handful of files. |
Check in a gypified gtest and add a simple unit test to show that the basic infrastructure is in place. Refs: nodejs#1193
I'm fine with this. Will it mean |
Not right away but it could, longer term. Not the part of |
Check in a gypified gtest and add a simple unit test to show that the basic infrastructure is in place. PR-URL: nodejs#1199 Refs: nodejs#1193 Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Can this be closed now? :) Edit: Assuming it's open until we add more coverage? |
Yes, it's fixed (if you can call it that) in 0080788. Adding tests for code in src/ is an ongoing process. |
Meta-issue for something that was discussed in today's TC meeting: test coverage for C++ code that is only tested indirectly now.
Strawman proposal: bundle gtest, make it part of
make test
and start churning outsrc/*_unittest.cc
tests like chromium has.Problem: most of the code in src/ is not very modular right now. Turning it into something that is easily testable will no doubt create a lot of churn. Probably unavoidable but it's acceptable to me.
/cc @indutny @piscisaureus @trevnorris - if we can get some consensus on this, I volunteer to do the initial work.
The text was updated successfully, but these errors were encountered: