Bitcoin Forum
April 19, 2024, 09:14:25 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Unit tests?  (Read 1468 times)
Jim Hyslop (OP)
Member
**
Offline Offline

Activity: 98
Merit: 20


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
1713518065
Hero Member
*
Offline Offline

Posts: 1713518065

View Profile Personal Message (Offline)

Ignore
1713518065
Reply with quote  #2

1713518065
Report to moderator
1713518065
Hero Member
*
Offline Offline

Posts: 1713518065

View Profile Personal Message (Offline)

Ignore
1713518065
Reply with quote  #2

1713518065
Report to moderator
Once a transaction has 6 confirmations, it is extremely unlikely that an attacker without at least 50% of the network's computation power would be able to reverse it.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713518065
Hero Member
*
Offline Offline

Posts: 1713518065

View Profile Personal Message (Offline)

Ignore
1713518065
Reply with quote  #2

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

Activity: 588
Merit: 500



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.

3KzNGwzRZ6SimWuFAgh4TnXzHpruHMZmV8
Steve
Hero Member
*****
Offline Offline

Activity: 868
Merit: 1007



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 (OP)
Member
**
Offline Offline

Activity: 98
Merit: 20


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
Merit: 2216


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 (OP)
Member
**
Offline Offline

Activity: 98
Merit: 20


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: 2506
Merit: 1010


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

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


Steve
Hero Member
*****
Offline Offline

Activity: 868
Merit: 1007



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
Merit: 1007



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:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!