org.mozilla.javascript.tools.shell.Global.doctestOutputMatches()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 JavaScript  
字(1.2k)|赞(0)|评价(0)|浏览(200)

本文整理了Java中org.mozilla.javascript.tools.shell.Global.doctestOutputMatches()方法的一些代码示例,展示了Global.doctestOutputMatches()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Global.doctestOutputMatches()方法的具体详情如下:
包路径:org.mozilla.javascript.tools.shell.Global
类名称:Global
方法名:doctestOutputMatches

Global.doctestOutputMatches介绍

[英]Compare actual result of doctest to expected, modulo some acceptable differences. Currently just trims the strings before comparing, but should ignore differences in line numbers for error messages for example.
[中]将doctest的实际结果与预期结果进行比较,以一些可接受的差异为模。目前只是在比较之前修剪字符串,但是应该忽略错误消息行号的差异。

代码示例

代码示例来源:origin: org.jvnet.hudson/embedded-rhino-debugger

resultString += err.toString() + out.toString();
if (!doctestOutputMatches(expectedString, resultString)) {
  String message = "doctest failure running:\n" +
    inputString +

代码示例来源:origin: ro.isdc.wro4j/rhino

resultString += err.toString() + out.toString();
if (!doctestOutputMatches(expectedString, resultString)) {
  String message = "doctest failure running:\n" +
    inputString +

代码示例来源:origin: com.github.tntim96/rhino

resultString += err.toString() + out.toString();
if (!doctestOutputMatches(expectedString, resultString)) {
  String message = "doctest failure running:\n" +
    inputString +

相关文章