What does “to stub” mean in programming?

后端 未结 10 990
盖世英雄少女心
盖世英雄少女心 2020-12-12 10:06

For example, what does it mean in this quote?

Integrating with an external API is almost a guarantee in any modern web app. To effectively test such i

10条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-12 10:25

    Stub is a function definition that has correct function name, the correct number of parameters and produces dummy result of the correct type.

    It helps to write the test and serves as a kind of scaffolding to make it possible to run the examples even before the function design is complete

提交回复
热议问题