Skip to content

Unit tests for IsWitnessProgram #14737

@domob1812

Description

@domob1812

As far as I can tell, there are no unit tests (src/test) for CScript::IsWitnessProgram and other related functions (e.g. CScript::IsPayToWitnessScriptHash). There are unit tests for the very similar CScript::IsPayToScriptHash.

Is there a particular reason why those tests are unnecessary / unwanted, or were they simply not considered important enough to warrant the time for being written?

I'm currently working on some changes to those functions, which I would like to unit test. In case such tests are simply missing at the moment without being actually unwanted, I'd be happy to write unit tests also for the current version of the code and submit them as PR. If so, I guess an appropriate place would be a new script_segwit_tests.cpp file?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions