正确的做法是显式地测试字符串是否为空,使用相应的内置函数。
The correct solution is to explicitly test strings for emptiness using the appropriate built-in function.
在现有的报表中添加或修改一个列标题和描述,报表属性文件中的测试字符串定义也需要被添加以及修改。
A column heading and description is added or changed in an existing report, its test string definition also needs to be added or changed in the report property file.
未使用的和改变的列用行进行测量。所以在4 月9 号的工作版本中,会测试字符串 C 的一些行。
The Unused and Change columns are measured in lines, so ten fewer lines of strings.c were tested in the Apr 9 build.
在“string”框内输入要发送到Web服务的测试字符串,并单击“Go”按钮,以调用服务,如下面的图7中所示。
Enter a test string to send to your Web service in the "string" box and click the "Go" button to invoke the service, as per Figure 7 below.
清单2给出了一些值得为任何字符串实现创建的测试。
Listing 2 shows some of the tests worth creating for any string implementation.
清单3展示了相同的代码,但是添加了测试单词字符串长度和频率的逻辑。
Listing 3 shows the same code with logic added that tests for word string length and frequency.
通过使用正则表达式引擎,很容易测试出字符串是否与模式匹配。
Using a regular expression engine, it is easy to test if a string matches the pattern.
您可以使用您自己的字符串,或者来自另一个数据源的值来替换该值,这些数据源包括数据汇,引用,通用代码,或者其他的测试变量。
You can substitute this value with your own text string or a value from another data source, such as a data pool, reference, custom code, or another test variable.
您需要修改发送简单文本字符串的初始测试客户机,使其发送XML消息。
You will modify the original test client that sent a simple text string to send an XML message.
较理想的做法是,字符串有一个如error或与之相似的子串(见蓝色粗体的语句),这个子串允许测试者很快地在输出文件中查找到错误。
Ideally, the string of characters should have a substring such as error or something similar (see the statement in bold blue), which will allow the tester to quickly find the error in the output file.
清单2显示了字符串测试的更多示例。
我编写处理这些非正式解析任务的程序的方法总是有点象大杂烩,其中包括定制状态机、正则表达式以及上下文驱动的字符串测试。
The way I have programmed these informal parsing tasks has always been somewhat of a hodgepodge of custom state-machines, regular expressions, and context-driven string tests.
更复杂的测试场景(其中可能包含多个未完成任务,每个任务需要使用不同的数据完成)将需要使用查询字符串。
More complex test scenarios, where there might be several outstanding tasks, each needing completion with different data, will require the use of a query string.
事实上,这是个棘手的测试,只要您能够把DNA表示为字符串,就可以利用一个确定串之间的差异的CPAN模块。
This is a tricky test, actually, and a CPAN module for finding the distance of strings might be useful here, as long as you can represent the DNA as a string.
您可以使用查询字符串(而不是仅使用任务名称)来指定测试。
You could have specified your test using a query string instead of just the task name.
为了加快字符串等同性测试的速度,可以打开该特性。
要映射TestTableName属性,请使用名称为PreTestSQL字符串的WebSphere属性,在这里您可以设置一条 SQL语句来测试每个JDBC连接。
To map the TestTableName attribute, use the WebSphere property called PreTest SQL string, where you can set an SQL sentence to test each JDBC connection.
然而,Match对象并非用于测试匹配而是为在输入字符串中找到的第一个匹配项创建的。
Instead of testing for a match, however, a match object is created for the first match found in the input string.
关键词equals是指一个内嵌的通讯,它允许对字符串和其他原始类型的相等测试。
The equals keyword refers to a built-in correspondence, which allows one to test the equality of strings and other primitive types.
我必须检查这个属性实际上是否出现,因为当没有这个属性时,contains测试将返回true(所有字符串都包含空字符串)。
Note that I have to check that the attribute is actually present, since when it's absent the contains test would return true (the empty string is contained in all strings).
在这个测试编辑器的TestData部分,如图10所示,注意到您键入的作为query项目中value值的搜索字符串。
In the test Data section of the test editor, shown in Figure 10, you will notice the search string you entered as the Value for the item query.
假定希望输出测试文件中包含字符串th 的所有单词,则构建清单5 中所示的regexp 进行此工作。
Say you want to output all the words in the test file containing the string th, and you've built the regexp shown in Listing 5 to do that.
使用:Test -Layer:字符串标出包含测试的文件是一种有意思的机制。
Using: Test-Layer: strings to mark files with tests is an interesting mechanism.
图1显示了服务的主要测试规范部分,该服务采用一个简单的Post Code字符串,并返回一个数据对象,预期的结果在一个简单的有效负载文件中指定。
Figure 1 shows the major test specification parts for a service that takes a simple PostCode string and returns a data object, the expected result being specified in a simple payload file.
IncludeConnectioninformationandusername:该选项可以将连接字符串和用户名包括在所有生成的测试类中。
Include connection information and user name: This option will result in the inclusion of connection string and user name in all generated test classes.
在清单5中,测试不需要与字符串进行比较,因为变量返回一个Boolean类型而不是rtf作为select属性的结果。
In Listing 5, the test does not need to compare to a string because the variable returns a Boolean type rather than an RTF as a result of the select attribute.
这也意味着对于要进行简单测试的任何简短代码,LINQPad非常有用,例如:棘手的数字格式字符串或者匹配正则表达式。
This means LINQPad is useful for any code snippet needing simple testing, e.g., tricky numeric format strings or Regex matching.
无意中翻译掉的字符串的测试。
您可以使用此程序测试上面提供的搜索字符串,可以验证您看到了期望的结果。
You can use this program to test the search strings presented above, and see that you get the expected results.
数组的内容然后被连接成一个长字符串,字符串又被加载到一个XML对象中,在本测试案例中还被回显。
The contents of the array are then imploded into one long string, which is in turn loaded into an XML object and (in this test case) echoed.
应用推荐