当您测试您的程序时,Purify将会提供整个真实的api函数定义,而存根会被忽视。
When you instrument your program, Purify provides the real definitions for the API functions, and stubs are ignored.
实际上您可以使用系统中的strcmp,但是测试程序错误地认为缺少这个函数。
In fact, you could indeed use STRCMP on that system, but the test program incorrectly thought it was missing.
一旦完成,ObserveOnTest函数就会通过一个叫做WorkItemTestScheduler的特殊计划程序把单元测试框架关联到调用链上。
Once that is done the ObserveOnTest function attaches the unit test framework to the call chain via a specialized scheduler called the WorkItemTestScheduler.
您可以用if(purify_is_running()) 来包围多个PurifyAPI ,从而使 Purify函数命令不会在您未测试的程序中变得缓慢(请看列表4)。
You can surround multiple Purify APIs with if(purify_is_running()) to keep Purify function calls from slowing down your uninstrumented program (see Listing 4).
在测试中,调用ex版本的strsafe系列函数的程序会在调用失败时把缓冲区设为NULL,并以0xfe作为填充字节,代码如下。
For this test, the Ex versions of the strsafe functions set NULL on failure and 0xfe as the fill byte.
如果您添加一项新功能,可以首先在沙箱里(完全脱离了应用程序的其余部分)进行测试,查看它作为单个函数的行为。
If you're adding a new function, try it out first in a sandbox-preferably completely outside the rest of the application-to see it behave as a single function.
该测试程序链接到再次打印该消息的两个函数上:第一次都用大写字符,第二次都用小写字符。
The test links to two functions that print the message again: the first time in all uppercase characters and then again in lowercase characters.
现在准备好了所有函数,您只需驱动程序以便进行测试。
Now have all of your functions, you just need something to drive the program so that you can test it.
使用zope . testing的一些程序员在test_suite函数中手工地创建和维护测试列表。
Some programmers using zope.testing just create and maintain this list of tests manually, in the test_suite function.
现在,我有一个叫做单元测试股票,的测试程序,called,unit,test,stock。,我一开始没把它当成函数,我写了几行小代码。后来我发现我太笨了,因为我会用上很多次这段语句。
So, I now have this unit test program unit test stock I originally did not make it a function, I had it in-line, and I realized that was really stupid, because I wanted to do it a lot of times.
但是,如果程序员希望编写简单的测试代码,不愿意考虑doctest涉及的乱七八糟的东西,那么测试函数是很好的方法。
But when programmers want to write simple test code without all the verbiage involved in a doctest, then test functions are a wonderful way to write.
xml2json _test . php——执行xml2json转换函数的测试驱动程序。
Xml2json_test.php - A test driver to exercise the xml2json conversion function.
主要是因为该测试程序按照非常模块化的方法编写 —使用构造函数init()方法 —以便不需要很大修改就能用于您自己的程序。
Much of that is because the test program is set up in a way that is pretty modular—with a constructor and init() method—so you can easily reuse this code for your own purposes without lots of changes.
纯洁性也有利于测试,尤其当程序的结构是由许多小函数嵌合而成的时候;比如Haskell的纯洁性就有效地降低了通过QuickCheck(译注:Haskell开源测试框架)进行测试的难度。
Purity also facilitates testing, for instance through QuickCheck, especially if the program is structured around a lot of small functions combined together.
测控软件以事件驱动、回调函数与交互式程序,完成静态参数综合测试。
The integration test for static parameter was completed by control software as well as event-driven, callback functions and interactive program.
二分查找函数模板及测试程序,它能实现查找方式中的二分查找,党查找失败时返回- 1 !
Binary search function template and test procedures, it can find ways to implement binary search, the party returns-1 lookup failed!
然后通过DSP开发软件CCS进行调试测试,再分函数计算程序运行所占用的时间。
Then through the CCS to debug DSP software development testing, sub-function to calculate the time occupied by image processing.
最后详细地介绍了在QNX下驱动程序的开发包括中断处理函数的编写、系统硬件资源的管理以及驱动程序与测试程序的接口。
We also introduce the development of device driver under QNX, include programme of the interrupt handler, management of hardware resource and interface between application and device driver.
测试系统硬件设计包括对信号调理模块和数据采集模块的设计,软件设计包括接口函数和上层应用程序设计。
The design of hardware includes signal conditioning module and data acquisition module. The design of software includes interface program and upper layer program.
好了,到现在为止,我已经创建了一个相当精确的基准测试函数,这个函数可以用来计算各个不同部分的代码甚至是整个应用程序的运行时间。
Okay, at this point, I created a fairly precise benchmarking function that can be used for timing different portions of code, or even complete applications.
好了,到现在为止,我已经创建了一个相当精确的基准测试函数,这个函数可以用来计算各个不同部分的代码甚至是整个应用程序的运行时间。
Okay, at this point, I created a fairly precise benchmarking function that can be used for timing different portions of code, or even complete applications.
应用推荐