此代码示例中不可测试的含义是什么?

问题描述 投票:0回答:1

我需要在播放代码后分析代码,看看我是否有完整报道。该报告的某些部分如下所示:

    game->errorCode = ERROR_NO_MEMORY;                      
    #pragma RVS justification( "COV_STATEMENTS", "not testable");                       
}                       
else {                      
    /* Initialize platform */       
    game->errorCode = platformInit(game);
    if (game->errorCode == ERROR_NONE) {            
        /* If platform was correctly initialized, start the game */     
        startGame(game);        
    } else {                
        #pragma RVS justification( "COV_MCDC", "1:game->errorCode == ERROR_NONE", "not testable");
        #pragma RVS justification( "COV_DECISIONS", "not testable");                
    }

[他们说“不可测试”是什么意思?它是代码无法覆盖的一部分吗?如果可以,为什么?

unit-testing testing tdd integration-testing
1个回答
0
投票

使用术语不可测试,因为从正确性测试的角度来看,如果无法确定输出是否正确或必须花费一些特别的时间来做到这一点,那么通过执行测试。

© www.soinside.com 2019 - 2024. All rights reserved.