gtorrent / gtorrent-core

Core library of gTorrent which handles everything but UI/UX
GNU General Public License v3.0
39 stars 12 forks source link

unit tests with googletest #99

Closed benwaffle closed 10 years ago

benwaffle commented 10 years ago

Of course this will need better integration with CMake and travis

nyanpasu commented 10 years ago

Wish you'd split up the commit containing 'a simple test case' for just our repo separately so that I don't have to look through a 100k diff to find what I'm looking for.

fuyukaidesu commented 10 years ago

One hundred thousands lines of code to test if the magnet method returns true if the argument passed is "magnet".

what is assert

If you seriously want something like this to be merged, you'll need to write more complete tests.

benwaffle commented 10 years ago

Obviously thats planned

fuyukaidesu commented 10 years ago

Why make a PR then.

zovt commented 10 years ago

Is there a reason that you didn't use a submodule for googletests?

benwaffle commented 10 years ago

It's not hosted on github We could though

zovt commented 10 years ago

There is one hosted here, but it was last updated ~3 years ago, whereas the latest release on their official repo is from 2013. I'm going to do some looking around to see if we can add an svn submodule

zovt commented 10 years ago

http://stackoverflow.com/questions/465042/is-it-possible-to-have-a-subversion-repository-as-a-git-submodule

I suppose if we had to we could mirror their SVN repo ourselves. If anyone has a better solution, please do post

fuyukaidesu commented 10 years ago

The better solution would be to not use unit tests if no one knows how it works.

benwaffle commented 10 years ago

It easy to write, see main.cpp. And we'll just upload a copy of googletest to a new repo.

fuyukaidesu commented 10 years ago

You're going to need a more sophisticated example than main.cpp because assert can do very well the same thing without pulling a 100KLOC framework.

benwaffle commented 10 years ago

It has pretty output and details what goes wrong. Plus it has stuff like fixtures and other unit testing components

fuyukaidesu commented 10 years ago

Wowow only 100 files and 100kloc for colored output. Impressive.

No, seriously, go write all of the required unit test, because right now the merge is completely useless.