Bitcoin Forum
December 03, 2016, 04:59:26 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Unit tests?  (Read 1180 times)
Jim Hyslop
Member
**
Offline Offline

Activity: 98


View Profile
March 08, 2011, 04:28:53 AM
 #1

Hi,

Are there any unit tests, or testbeds of any kind, for Bitcoin?

Like my answer? Did I help? Tips gratefully accepted here: 1H6wM8Xj8GNrhqWBrnDugd8Vf3nAfZgMnq
1480741166
Hero Member
*
Offline Offline

Posts: 1480741166

View Profile Personal Message (Offline)

Ignore
1480741166
Reply with quote  #2

1480741166
Report to moderator
1480741166
Hero Member
*
Offline Offline

Posts: 1480741166

View Profile Personal Message (Offline)

Ignore
1480741166
Reply with quote  #2

1480741166
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480741166
Hero Member
*
Offline Offline

Posts: 1480741166

View Profile Personal Message (Offline)

Ignore
1480741166
Reply with quote  #2

1480741166
Report to moderator
1480741166
Hero Member
*
Offline Offline

Posts: 1480741166

View Profile Personal Message (Offline)

Ignore
1480741166
Reply with quote  #2

1480741166
Report to moderator
error
Hero Member
*****
Offline Offline

Activity: 574



View Profile
March 08, 2011, 04:37:18 AM
 #2

I don't know about unit tests, but there's a whole test network. Run the official client with -testnet option to use it.

15UFyv6kfWgq83Pp3yhXPr8rknv9m6581W
Steve
Hero Member
*****
Offline Offline

Activity: 868



View Profile WWW
March 08, 2011, 09:55:06 PM
 #3

Hi,

Are there any unit tests, or testbeds of any kind, for Bitcoin?

Not that I've found.  I'm in the process of refactoring the code (one h/cpp per class, etc).  I also grabbed googletest and plan to add a few unit tests to get the ball rolling.  The refactoring part might be a hinderance to adoption in the master branch (due to the large amount of change), but I do plan to keep it updated with the master.

(gasteve on IRC) Does your website accept cash? https://bitpay.com
Jim Hyslop
Member
**
Offline Offline

Activity: 98


View Profile
March 09, 2011, 02:17:22 AM
 #4

Not that I've found.  I'm in the process of refactoring the code (one h/cpp per class, etc).  I also grabbed googletest and plan to add a few unit tests to get the ball rolling.  The refactoring part might be a hinderance to adoption in the master branch (due to the large amount of change), but I do plan to keep it updated with the master.
I haven't used googletest. How does it compare to cppunit?

I've been thinking about splitting out the files, too. No functional changes, just moving things around. I think that might help its adoption into the main trunk.


Like my answer? Did I help? Tips gratefully accepted here: 1H6wM8Xj8GNrhqWBrnDugd8Vf3nAfZgMnq
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652


Chief Scientist


View Profile WWW
March 09, 2011, 02:20:53 AM
 #5

I've been thinking about splitting out the files, too. No functional changes, just moving things around. I think that might help its adoption into the main trunk.

Somebody did that a few months ago (theres a message here in the forums SOMEWHERE...)

If I recall correctly, after he was done he found that it wouldn't compile on Windows any more.


How often do you get the chance to work on a potentially world-changing project?
Jim Hyslop
Member
**
Offline Offline

Activity: 98


View Profile
March 09, 2011, 03:05:44 AM
 #6

Somebody did that a few months ago (theres a message here in the forums SOMEWHERE...)

If I recall correctly, after he was done he found that it wouldn't compile on Windows any more.
Not encouraging :=( Can you recall any keywords that might help me find it?

Steve, what platform are you compiling on?

Like my answer? Did I help? Tips gratefully accepted here: 1H6wM8Xj8GNrhqWBrnDugd8Vf3nAfZgMnq
Stephen Gornick
Legendary
*
Offline Offline

Activity: 1988



View Profile
March 09, 2011, 06:01:18 AM
 #7

I've been thinking about splitting out the files, too. No functional changes, just moving things around.

Somebody did that a few months ago (theres a message here in the forums SOMEWHERE...)

This?
  http://bitcointalk.org/index.php?topic=2244.0

Steve
Hero Member
*****
Offline Offline

Activity: 868



View Profile WWW
March 09, 2011, 08:52:46 PM
 #8

Somebody did that a few months ago (theres a message here in the forums SOMEWHERE...)

If I recall correctly, after he was done he found that it wouldn't compile on Windows any more.
Not encouraging :=( Can you recall any keywords that might help me find it?

Steve, what platform are you compiling on?

Mac OSX 10.6.6.

(gasteve on IRC) Does your website accept cash? https://bitpay.com
Steve
Hero Member
*****
Offline Offline

Activity: 868



View Profile WWW
March 09, 2011, 09:05:49 PM
 #9

I took a look at that other refactoring effort.  In light of that, I think I may be better off not worrying about master branch adoption and just carry on ...adopting changes from the master branch as they happen.  The thought of trying to get things compiling on MSVC++ isn't very appealing to me.  I want to split up the ui, miner, peer and wallet and enhance what the wallet can do (automated encryption and backups, etc).  I also have some ideas about the UI to make it better for novices (and working with the native ObjC/Xcode will facilitate that).  I also would like each of these components to be able to be statically or dynamically linked via well defined, C based APIs.  And, I'd like them to each have standalone versions with google protocol buffers for communications.  Lot's of ideas, but need to focus on one or two for now.

(gasteve on IRC) Does your website accept cash? https://bitpay.com
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!