Bitcoin Forum
December 09, 2016, 10:05:29 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Unit Tests  (Read 1077 times)
ThePiachu
Sr. Member
****
Offline Offline

Activity: 442



View Profile WWW
January 02, 2012, 02:36:46 AM
 #1

As the scope of unit tests from
https://bitcointalk.org/index.php?topic=56095.0
was broadened, I created a new topic for various Bitcoin-related Unit Tests.

Here is the repository:
https://github.com/ThePiachu/Bitcoin-Unit-Tests

For now there are a few tests for ECDSA key pair generation, Address generation, and some Script tests to run, along with description of the files. Everything is in plain text for easy use and reading. All in all, something anyone wanting to develop their own Bitcoin code could use.

I intend on developing more tests soon, and hopefully testing those tests against other major Bitcoin applications. If you are a developer and you ran those tests, please let me know of the results - successfully running the test means my code runs well, failed tests may indicate my code is at fault Wink.

1HWbVLhxj7bhewhyapMZpyhqWAeAhJd51E
My Bitcoin Calculator:
http://tpbitcalc.appspot.com/
1481277929
Hero Member
*
Offline Offline

Posts: 1481277929

View Profile Personal Message (Offline)

Ignore
1481277929
Reply with quote  #2

1481277929
Report to moderator
1481277929
Hero Member
*
Offline Offline

Posts: 1481277929

View Profile Personal Message (Offline)

Ignore
1481277929
Reply with quote  #2

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

Posts: 1481277929

View Profile Personal Message (Offline)

Ignore
1481277929
Reply with quote  #2

1481277929
Report to moderator
1481277929
Hero Member
*
Offline Offline

Posts: 1481277929

View Profile Personal Message (Offline)

Ignore
1481277929
Reply with quote  #2

1481277929
Report to moderator
1481277929
Hero Member
*
Offline Offline

Posts: 1481277929

View Profile Personal Message (Offline)

Ignore
1481277929
Reply with quote  #2

1481277929
Report to moderator
No_2
Hero Member
*****
Offline Offline

Activity: 775


BTC: the beginning of stake-based public resources


View Profile WWW
March 12, 2013, 03:04:17 AM
 #2

With regards to the mining clients were most of the unit tests implemented after the initial development? What is the percentage of coverage of unit-testable code?

Please Like or Follow MetaLair; we are promoting Bitcoin awareness and are building a decentralised exchange. We need your support.
Twitter: @MetaLair | Facebook | Google+
Lists: All Physicals Minted | UK Organisations Accepting Crypto | UK Organisations Accepting Crypto (reddit) | Payment Methods
grau
Hero Member
*****
Offline Offline

Activity: 836


bits of proof


View Profile WWW
March 12, 2013, 01:14:42 PM
 #3

If you are a developer and you ran those tests, please let me know of the results - successfully running the test means my code runs well, failed tests may indicate my code is at fault Wink.

Great work, thanks.
Would you mind using JSON format as do the unit tests for the Satoshi, BitcoinJ and bitsofproof implementations?
behindtext
Full Member
***
Offline Offline

Activity: 120


View Profile WWW
March 12, 2013, 04:18:30 PM
 #4

As the scope of unit tests from
https://bitcointalk.org/index.php?topic=56095.0
was broadened, I created a new topic for various Bitcoin-related Unit Tests.

Here is the repository:
https://github.com/ThePiachu/Bitcoin-Unit-Tests

For now there are a few tests for ECDSA key pair generation, Address generation, and some Script tests to run, along with description of the files. Everything is in plain text for easy use and reading. All in all, something anyone wanting to develop their own Bitcoin code could use.

I intend on developing more tests soon, and hopefully testing those tests against other major Bitcoin applications. If you are a developer and you ran those tests, please let me know of the results - successfully running the test means my code runs well, failed tests may indicate my code is at fault Wink.

glad to see someone talking about being proactive instead of reactive! Smiley

it is often ideal to have unit tests integrated into the main codebase so they can run when builds occur, but not all languages make this easy. i've gotten a lot of mileage out of using a post-commit hook with an automated build system, e.g. jenkins, for testing.

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!