不管您想要的工具或偏爱的方法是什么,重要的是:行动起来去积极改进代码质量并让手工代码检验的过程变得更加有效。
Regardless of your desired tool or preferred measure, it's important to take action to improve code actively and make your manual code review process more efficient.
该系统根据数控车削加工的特点实现了数控源程序编辑、代码检验解释、加工过程仿真等功能,在计算机上实现了数控车削编程和仿真加工的全过程。
This system can realize editing of CNC codes, explaining of program codes, and simulation of cutting process. CNC programming and simulation are done completely by the computer.
它也可以用作协作工具,所有对项目感兴趣的人都能执行测试来检验代码是否满足了产品需求。
FIT is a collaboration tool allowing everybody interested in a project to run tests which verify if the code meets the product requirements.
为了使用内存管理函数以使我们可以检验发生错误的位置,我们将使用以下代码。
To use the memory-management functions to allow us to verify where our error is happening, we use the code below.
单元测试的目标就是检验最小单元的代码是否像预期一样发挥作用。
The goal of unit testing is to verify whether the smallest unit of code behaves the way it is expected to.
那就是说,如果函数有确定的有效值集合或范围可作为参数,可以将检验参数是否有效的断言放在该函数代码的第一行。
That is, if a function has a certain set or range of valid values for its arguments, an assertion to this effect can be placed as the first line of code in the function.
基本测试应该包括对检验代码和断言以及数据库操作(比如创建、读取、更新和删除,CRUD)的测试。
Basic tests should include the testing of validation code and assertions, and database operations such as Create, Read, Update and Delete (CRUD).
在迭代开发中,在开发代码和测试片段时,他们的策略是进行广泛的检验,以确认架构的有效性以及与涉众需求的一致性。
In iterative development, as developers code and test pieces, their strategy is reviewed by a wider audience for architectural validity and compliance with stakeholder needs.
可以将测试按照测试代码的多少分类:“单元测试”检验单一组件的功能,比如一个函数或者一个类。
Tests can be categorized according to the amount of code they exercise: a unit test verifies the functionality of a single software component, such as a function or a class.
我们将会导入该类(装载我们通过视图模板生成的类)并且接下来检验代码的相关部分。
We will import the class (overriding the one generated for us by the View template) and then examine the relevant portions of the code.
单元测试检验代码是否做了开发人员希望它做的事儿,而不只是对类型进行拼写检查。
Unit testing provides verification that the code does what is expected, not just spell-checking your typing.
在大多数情况下,有效状态由代码中的检验控制。
In most part, a valid state is controlled by the validation in our code.
使用本机代码和第三方库检验了Ajax的使用 ——特别介绍了每个框架如何运行及接受具体的常用库。
The use of Ajax, using native code and third-party libraries, is examined — specifically, how each framework behaves and accepts specific popular libraries.
4健壮性回归套件是一个测试组,你可以在一个开发阶段不断运行它来检验代码变化没有对产品产生负面影响(产生回归)。
Sanity regression suites are test sets that you can run continually during a development phase to verify that code changes have not adversely affected the product (producing regressions).
清单4给出了X平方分布的构造函数代码,它构成了X平方分布检验的主干。
Listing 4 looks at the Chi Square constructor code which forms the backbone of the Chi Square test.
DB 2并没有检验该存储过程代码是否与DETERMINISTIC或NOT DETERMINISTIC的规格说明一致。
DB2 does not verify that the stored procedure code is consistent with the specification of DETERMINISTIC or not DETERMINISTIC.
只有在username或password之一非空的情况下,代码才会检验登录数据或颁发visa。
Only if one of either username or password is populated the code will proceed to verify the logon data or even issue a visa.
记住Purify只执行您在测试过程中实际执行的代码中的内存错误的检验。
Remember that Purify only performs memory error checking on code that you actually execute during testing.
在复制上面的代码以前您将交叉检验这些id。
You will will want to cross check those ids before copying the code above.
以上代码就绪后,让我们继续检验怎样在各种场景中成功地运行ServiceClass类的测试。
With the above code in place, let's move on to examining how you can run your test of the ServiceClass class successfully in different scenarios.
它们都有语法检验、代码完成和代码合并,都允许编译、运行和调试代码。
They both have syntax checking, code completion, and code folding. They both let you compile, run, and debug your code.
这些报告可以作为质量检验关,帮助您决定继续到测试阶段是不是实际的,或者是否需要重新评价源代码。
These reports can serve as a quality gate, helping you determine if proceeding to the testing phase is realistic or if you should remediate your the source code.
生成的代码相当简单,修改其行为以及添加检验功能和额外的处理也很容易。
The generated code is relatively simple and modifying its behavior, as well as adding validations and extra processing, is easily understood.
这可以通过定制所有数据库的改变和检验源代码控制实现。
This may be accomplished by scripting all changes to the database and checking them into source control.
服务器代码使用回调检验客户机在请求中提供的用户名和密码组合。
The callback is how your server code can verify the username-and-password combination supplied by the client on a request.
为了看看上述测试在检验这块代码时效果如何,我可以用Hansel检查代码覆盖情况。
To see just how effective my tests are at exercising the code, I can check code coverage with Hansel.
代码示例7:用于检验直角三角形的代码。
使用Justice检验的优势是:提供的错误信息要比JVM提供的信息更详细(包括堆栈状态和部分问题代码)。
Using Justice validation had the advantage of providing much more detailed information about errors than is supplied by the JVM (including the stack state and a portion of the problem code).
当我隔离和移除重复代码后,数字分类器和质数检验器就变得更简单了。
Once I've isolated and removed the duplicated code, both the number classifier and the prime-number tester are much simpler. Listing 4 shows the refactored number classifier.
当我隔离和移除重复代码后,数字分类器和质数检验器就变得更简单了。
Once I've isolated and removed the duplicated code, both the number classifier and the prime-number tester are much simpler. Listing 4 shows the refactored number classifier.
应用推荐