??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲午夜无码AV毛片久久,亚洲中文字幕一区精品自拍,亚洲色www永久网站http://www.tkk7.com/xixuui/category/15556.htmlzh-cnTue, 27 Feb 2007 14:25:04 GMTTue, 27 Feb 2007 14:25:04 GMT60如何试自定义断ahttp://www.tkk7.com/xixuui/archive/2006/11/24/83329.html阿辉阿辉Fri, 24 Nov 2006 09:48:00 GMThttp://www.tkk7.com/xixuui/archive/2006/11/24/83329.htmlhttp://www.tkk7.com/xixuui/comments/83329.htmlhttp://www.tkk7.com/xixuui/archive/2006/11/24/83329.html#Feedback0http://www.tkk7.com/xixuui/comments/commentRss/83329.htmlhttp://www.tkk7.com/xixuui/services/trackbacks/83329.html/**
  * asserts two String arrays are equal?br />  */
 public static void assertEquals(final String[] expected,
         final String[] actual)
 {
  if(expected == null && actual == null)
  {
   assertTrue(true);
  }
  else if(expected.length != actual.length)
  {
   fail("expected length is :" + expected.length + "but was:"
     + actual.length);
  }
  else
  {
   for(int i = 0; i < expected.length; i++)
   {
    assertEquals("W? + (i + 1) + "个元素不相等", expected[i], actual[i]);
   }
  }
 }

可是又怎么对该Ҏ(gu)q行试呢?

阿辉 2006-11-24 17:48 发表评论
]]>
Junit4功能 先睹为快. (译文) Q{Q?/title><link>http://www.tkk7.com/xixuui/archive/2006/09/22/71246.html</link><dc:creator>阿辉</dc:creator><author>阿辉</author><pubDate>Fri, 22 Sep 2006 01:44:00 GMT</pubDate><guid>http://www.tkk7.com/xixuui/archive/2006/09/22/71246.html</guid><wfw:comment>http://www.tkk7.com/xixuui/comments/71246.html</wfw:comment><comments>http://www.tkk7.com/xixuui/archive/2006/09/22/71246.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.tkk7.com/xixuui/comments/commentRss/71246.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/xixuui/services/trackbacks/71246.html</trackback:ping><description><![CDATA[ <table cellspacing="0" cellpadding="0" width="100%" border="0"> <tbody> <tr valign="top"> <td width="100%"> <h1>An early look at JUnit 4</h1> <p id="subtitle"> <em>Upcoming release promises evolution in testing</em> </p> </td> </tr> </tbody> </table> <table cellspacing="0" cellpadding="0" width="100%" border="0"> <tbody> <tr valign="top"> <td width="100%"> <p>隑ֺU别: ?/p> <p> <a href="/margiex#author"> <strong> <font color="#006bad">Elliotte Harold </font> </strong> </a>(<a href="mailto:elharo@metalab.unc.edu?subject=An early look at JUnit 4&cc=dwxed@us.ibm.com"><strong><font color="#006bad">elharo@metalab.unc.edu</font></strong></a>), Adjunct Professor, Polytechnic University<br /></p> <p>2005-9-15 Q译Q?/p> <p>原文Q?a ><strong><font color="#006bad">http://www-128.ibm.com/developerworks/java/library/j-junit4.html</font></strong></a></p> <blockquote>JUnit 是JAVA语言事实上的标准试库。JUnit 4是三q以来最具里E碑意义的一ơ发布。它的新Ҏ(gu)主要是针对JAVA5中的标记QannotationQ来化测试,而不是利用子cR反或命名机制。本文将讲述如何使用JUnit 4Q当前前提是你最好具有JUnit的用经验.</blockquote> <p>JUnit, 由Kent Beck ?Erich Gamma开发,几乎是JAVA开发最重要的第三方工具。正如Martin Fowler 所_(d)“在软g开发领域,从来没有如此少的代码vC(jin)如此重要的作用“。由于JUnitQJAVA代码变得更健壮,更可靠,BUG也比以前更少。由于JUnit (由Smalltalk's的SUnit得来) 的出玎ͼ随后产生?jin)许多xUnit的测试工P如nUnit (.NET), pyUnit (Python), CppUnit (C++), dUnit (Delphi) 和其它不同^台及(qing)语言的测试相关的工具?/p> <p>虽然JUnit也只是一个工P但其产生的思想和技术却较其架构更意义重大。单元测试,试先行的编E方式,试驱动的开发方式,q必须由JUNIT实现Q也不一定要用SWing实现GUI界面。JUNIT最q的一ơ更新是在三q前Q但它比其它大多数有BUG的框枉要健壮,更重要的是,JAVA一直在改进。现在JAVA支持泛型Q枚举,可变长度参数Q以?qing)标记语aQ开创了(jin)开发可重用框架的新局面)(j)?/p> <p>JUnit's的停滞不前得那些想要变革的开发h员换其它试工具Q挑战者有Bill Venners的Artima SuiteRunner和Cedric Beust的TestNGQ这些工具库虽然有值得推荐的功能,但没有Q何一ƄC能与JUNIT相比Q没有Q何一Ƒַ兯其它业界产品如Ant, Maven, Eclipseq泛支持Q因此Beck 和Gamma双开始利用JAVA5的新Ҏ(gu)来开发新版的JUNITQ目的是利用JAVA5中的标记Ҏ(gu)得单元测试开发更Ҏ(gu)。Beck_(d)(x)“JUNIT4的主要目的是通过化JUNIT的用鼓励更多的开发h员写更多的测试”。虽然会(x)与以前的版本兼容Q但JUNIT4与从JUNIT1.0开始的版本相比?x)有一个非常大的变化. </p> <p> <strong>注意: </strong>修改基本框架是一把双刃剑Q虽然JUNIT4的目的是清晰的,但细节仍有许多不同,因此本文只是一个简单的介绍Qƈ不是最l文. </p> <p> <a name="N1007F"> <span id="tpbhxxh" class="atitle"> <strong>试Ҏ(gu)</strong> </span> </a> </p> <p>以前所有版本的JUNIT都用命名机制和反射来定位测试,下面的代码测?+1= 2Q?/p> <table cellspacing="0" cellpadding="5" width="100%" bgcolor="#eeeeee" border="1"> <tbody> <tr> <td> <pre> <code class="section">import junit.framework.TestCase; public class AdditionTest extends TestCase { private int x = 1; private int y = 1; public void testAddition() { int z = x + y; assertEquals(2, z); } }</code> </pre> </td> </tr> </tbody> </table> <br /> <p>而在JUNIT 4中,试Ҏ(gu)?strong>@Test</strong> 标记说明Q如下:(x)</p> <table cellspacing="0" cellpadding="5" width="100%" bgcolor="#eeeeee" border="1"> <tbody> <tr> <td> <pre> <code class="section">import org.junit.Test; import junit.framework.TestCase; public class AdditionTest extends TestCase { private int x = 1; private int y = 1; @Test public void testAddition() { int z = x + y; assertEquals(2, z); } }</code> </pre> </td> </tr> </tbody> </table> <br /> <p>使用标记的好处是你不用将所有测试方法命名ؓ(f) <code>testFoo()</code>, <code>testBar(){等?test"开头的Ҏ(gu)Q下面的Ҏ(gu)也同样可以工作:(x)</code></p> <table cellspacing="0" cellpadding="5" width="100%" bgcolor="#eeeeee" border="1"> <tbody> <tr> <td> <pre> <code class="section">import org.junit.Test; import junit.framework.TestCase; public class AdditionTest extends TestCase { private int x = 1; private int y = 1; @Test public void additionTest() { int z = x + y; assertEquals(2, z); } }</code> </pre> </td> </tr> </tbody> </table> <br /> <p>下面的代码也同样正确Q?/p> <table cellspacing="0" cellpadding="5" width="100%" bgcolor="#eeeeee" border="1"> <tbody> <tr> <td> <pre> <code class="section">import org.junit.Test; import junit.framework.TestCase; public class AdditionTest extends TestCase { private int x = 1; private int y = 1; @Test public void addition() { int z = x + y; assertEquals(2, z); } }</code> </pre> </td> </tr> </tbody> </table> <br /> <p>q种命名机制最大的优点是更适合你的待测试类或方法名Uͼ例如Q你可以使用ListTEst.contains()试 <code>List.contains()</code>;使用ListTest.addAll()试 <code>List.add(){等Q?/code></p> <p> <code> <strong>TestCase</strong>q可以l用,但你没有必须再扩展ؓ(f)子类Q只要你声明?jin)@TestQ你可以测试方法放在Q何类中,当然如要讉Ka(chn)ssert{方法,你必要引用junit.Assertc,如下Q?/code> </p> <table cellspacing="0" cellpadding="5" width="100%" bgcolor="#eeeeee" border="1"> <tbody> <tr> <td> <pre> <code class="section">import org.junit.Assert; public class AdditionTest { private int x = 1; private int y = 1; @Test public void addition() { int z = x + y; Assert.assertEquals(2, z); } }</code> </pre> </td> </tr> </tbody> </table> <br /> <p>你也可以使用JDK5中的新特?static import)使得跟以前版本一L(fng)单:(x) </p> <table cellspacing="0" cellpadding="5" width="100%" bgcolor="#eeeeee" border="1"> <tbody> <tr> <td> <pre> <code class="section">import static org.junit.Assert.assertEquals; public class AdditionTest { private int x = 1; private int y = 1; @Test public void addition() { int z = x + y; assertEquals(2, z); } }</code> </pre> </td> </tr> </tbody> </table> <br /> <p>q种Ҏ(gu)试受保护的Ҏ(gu)非常Ҏ(gu)Q因Z可以在测试类中承有受保护方法的c. </p> <br /> <table class="no-print" cellspacing="0" cellpadding="0" align="right"> <tbody> <tr align="right"> <td> <table cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td valign="center"> <br /> </td> <td valign="top" align="right"> <a class="fbox" href="/margiex#main"> <b> <font color="#006bad">Back to top</font> </b> </a> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <br /> <br /> <p> <a name="N100DD"> <span id="nlrxztf" class="atitle">SetUp 和TearDown</span> </a> </p> <p>JUnit 3 ?strong>test runners</strong> ?x)在每个试之前自动调?<code>setUp()Ҏ(gu)。此Ҏ(gu)主要用于初始化变量,打开日志Q重|环境变量等。下面是XOM's <code>XSLTransformTest中的</code></code><code>setUp()Ҏ(gu)Q?/code></p> <table cellspacing="0" cellpadding="5" width="100%" bgcolor="#eeeeee" border="1"> <tbody> <tr> <td> <pre> <code class="section">protected void setUp() { System.setErr(new PrintStream(new ByteArrayOutputStream())); inputDir = new File("data"); inputDir = new File(inputDir, "xslt"); inputDir = new File(inputDir, "input"); }</code> </pre> </td> </tr> </tbody> </table> <br /> <p>在JUnit 4中,你仍然可以在每个试前初始化变量和配|环?Q然而,q些操作可以不用在Setup()中完成,你可以在初始化方法前面添?strong>@Beforer</strong> 来表C,如下Q?</p> <table cellspacing="0" cellpadding="5" width="100%" bgcolor="#eeeeee" border="1"> <tbody> <tr> <td> <pre> <code class="section">@Before protected void initialize() { System.setErr(new PrintStream(new ByteArrayOutputStream())); inputDir = new File("data"); inputDir = new File(inputDir, "xslt"); inputDir = new File(inputDir, "input"); }</code> </pre> </td> </tr> </tbody> </table> <br /> <p>你也可以有多个方法标记有QBeforeQ所有方法都?x)在每个试之前执行Q?</p> <table cellspacing="0" cellpadding="5" width="100%" bgcolor="#eeeeee" border="1"> <tbody> <tr> <td> <pre> <code class="section">@Before protected void findTestDataDirectory() { inputDir = new File("data"); inputDir = new File(inputDir, "xslt"); inputDir = new File(inputDir, "input"); } @Before protected void redirectStderr() { System.setErr(new PrintStream(new ByteArrayOutputStream())); }</code> </pre> </td> </tr> </tbody> </table> <br /> <p>清除环境与JUNIT3 差不多,在JUNIT3中?<code>tearDown()Ҏ(gu)Q下面的代码是结束测试时回收内存Q?/code></p> <table cellspacing="0" cellpadding="5" width="100%" bgcolor="#eeeeee" border="1"> <tbody> <tr> <td> <pre> <code class="section">protected void tearDown() { doc = null; System.gc(); } </code> </pre> </td> </tr> </tbody> </table> <br /> <p>在JUnit 4中,你还可以使用<strong>@After</strong>标记来说明:(x) </p> <table cellspacing="0" cellpadding="5" width="100%" bgcolor="#eeeeee" border="1"> <tbody> <tr> <td> <pre> <code class="section">@After protected void disposeDocument() { doc = null; System.gc(); } </code> </pre> </td> </tr> </tbody> </table> <br /> <p>?<code>@Before一P你也可以有多个标记有</code><code>@After的清除方法,每个都会(x)在执行完每个试后执行?/code></p> <p>最后,你不需要在父类中明调用这些初始化或清除方法.test runner?x)自动调用这些标记的?gu)Q子cM的@BeforeҎ(gu)在父cȝ@BeforeҎ(gu)之后执行Q这与构造函数的执行序一P(j)Q而@AfterҎ(gu)刚好相反Q子cM的@AfterҎ(gu)先执行.然而,多个@Before和@AfterҎ(gu)的执行顺序就是未知的Q?/p> <p> <font face="宋体"> <strong>试集范围的初始?/strong> </font> </p> <p>JUnit 4中引入了(jin)一JUNIT3没有的新Ҏ(gu),cȝ别的setUp()和tearDown()Q即在一个类的所有测试前执行初始化,q在所有测试完成后执行清除?</p> <p>例如Q一个测试类中的每个试都要用到一个数据库q接或网l连接,或其它很耗资源初始化或释攄资源Q用不着在每个测试方法前后进行操作,而只需要在试cd始前后执行即可。下面的CZ是用第三方的库q行错误Q在执行所有测试前错误先重定向到非标准输出,然后在所有测试结束后再输出到需要的地方Q这样就不会(x)影响到测试过E中产生的其它信息?/p> <table cellspacing="0" cellpadding="5" width="100%" bgcolor="#eeeeee" border="1"> <tbody> <tr> <td> <pre> <code class="section">// This class tests a lot of error conditions, which // Xalan annoyingly logs to System.err. This hides System.err // before each test and restores it after each test. private PrintStream systemErr; @BeforeClass protected void redirectStderr() { systemErr = System.err; // Hold on to the original value System.setErr(new PrintStream(new ByteArrayOutputStream())); } @AfterClass protected void tearDown() { // restore the original value System.setErr(systemErr); }</code> </pre> </td> </tr> </tbody> </table> <br /> <p>上面的操作没有必d每个试前后执行。然而要注意的是Q这U方法可能媄(jing)响测试间的结果,如果一个测试改变了(jin)初始化的对象Q而这个对象可能是其它试的输入,那么试的结果可能不正确Q这U方法将依赖试的顺序ƈ可能引入BUG。当优化试性能Qƈ且当你改q了(jin)配置和基准测试后而仍然很慢时Q如数据库连接或|络问题Q你才需要考虑使用q种Ҏ(gu)。只有这P你才能每天执行多ơ测试?</p> <br /> <table class="no-print" cellspacing="0" cellpadding="0" align="right"> <tbody> <tr align="right"> <td> <table cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td valign="center"> <br /> </td> <td valign="top" align="right"> <a class="fbox" href="/margiex#main"> <b> <font color="#006bad">Back to top</font> </b> </a> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <br /> <br /> <p> <a name="N10173"> <span id="zhtfpth" class="atitle"> <strong>异常试</strong> </span> </a> </p> <p>异常试是JUNIT4中的最大的改进Q以前异常测试是通过try catch实现Q当抛出异常Ӟ在try的最后添加一条fail()语句实现Q如下:(x) </p> <table cellspacing="0" cellpadding="5" width="100%" bgcolor="#eeeeee" border="1"> <tbody> <tr> <td> <pre> <code class="section">public void testDivisionByZero() { try { int n = 2 / 0; fail("Divided by zero!"); } catch (ArithmeticException success) { assertNotNull(success.getMessage()); } }</code> </pre> </td> </tr> </tbody> </table> <br /> <p>q种Ҏ(gu)不仅隄Q而且造成无论成功或失败,代码覆盖工具都不能执行某些代码.而在JUnit 4中,你可以在要抛出异常的代码中添加标记来声明一个异常是期望的:(x) </p> <table cellspacing="0" cellpadding="5" width="100%" bgcolor="#eeeeee" border="1"> <tbody> <tr> <td> <pre> <code class="section">@Test(expected=ArithmeticException.class) public void divideByZero() { int n = 2 / 0; }</code> </pre> </td> </tr> </tbody> </table> <br /> <p>如果没有异常抛出Q上面的试则会(x)p|Q如果你想知道异常的详细信息或其它情况,你还是要使用try catch才行 <br /></p> <table class="no-print" cellspacing="0" cellpadding="0" align="right"> <tbody> <tr align="right"> <td> <table cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td valign="center"> <br /> </td> <td valign="top" align="right"> <a class="fbox" href="/margiex#main"> <b> <font color="#006bad">Back to top</font> </b> </a> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <br /> <br /> <p> <font face="宋体"> <strong>需要忽略的试</strong> </font> </p> <p>也许你有些测试需要很长时间才能执行完成,q是这个测试应该跑得快Q而是它做的很复杂和很慢的工作造成的.如访问远E网l错误,需要很久才能有反馈Q如果你不想让这U测试破坏你整个试q程Q你可能惌q这个测试.当然也有可能某个试出控制范围而失败.如W3C XInclude试集中自动识别一些JAVA不支持的Unicode代码Qؓ(f)?jin)防止这些测试L通不q,可以使用标记 <code><strong>@Ignore</strong>跌q些,如下Q?/code></p> <table cellspacing="0" cellpadding="5" width="100%" bgcolor="#eeeeee" border="1"> <tbody> <tr> <td> <pre> <code class="section">// Java doesn't yet support the UTF-32BE and UTF32LE encodings @Ignore public void testUTF32BE() throws ParsingException, IOException, XIncludeException { File input = new File( "data/xinclude/input/UTF32BE.xml" ); Document doc = builder.build(input); Document result = XIncluder.resolve(doc); Document expectedResult = builder.build( new File(outputDir, "UTF32BE.xml") ); assertEquals(expectedResult, result); }</code> </pre> </td> </tr> </tbody> </table> <br /> <p>test runner不会(x)执行q些试Q但?x)说明这些测试被跌了(jin)。在命o(h)行测试界面中Q字母“I”会(x)表示试跌Q或“E”表C测试失败,而不是用点?"表示成功Q?/p> <table cellspacing="0" cellpadding="5" width="100%" bgcolor="#eeeeee" border="1"> <tbody> <tr> <td> <pre> <code class="section">$ java -classpath .:junit.jar org.junit.runner.JUnitCore nu.xom.tests.XIncludeTest JUnit version 4.0rc1 .....I.. Time: 1.149 OK (7 tests)</code> </pre> </td> </tr> </tbody> </table> <br /> <p>要注意的是,假设q些试׃某种理由攑֜最开始,如果你以后一直忽略这些测试,那些需要被试的代码可能有问题而不?x)被(g)到。因此忽略测试只是一个(f)时解x法,q不是一个解决Q何问题的真正办法?</p> <br /> <table class="no-print" cellspacing="0" cellpadding="0" align="right"> <tbody> <tr align="right"> <td> <table cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td valign="center"> <br /> </td> <td valign="top" align="right"> <a class="fbox" href="/margiex#main"> <b> <font color="#006bad">Back to top</font> </b> </a> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <br /> <br /> <p> <font face="宋体"> <strong>旉试</strong> </font> </p> <p>性能试是单元测试中最头疼的问题,JUnit 4也未完全解决此问题, 你可以在JUNIT4的测试方法中d一个时间参数。如果测试时间超q参敎ͼ则测试失败。如下,如果试旉过0.5U,则此试p|Q?/p> <table cellspacing="0" cellpadding="5" width="100%" bgcolor="#eeeeee" border="1"> <tbody> <tr> <td> <pre> <code class="section"> @Test(timeout=500) public void retrieveAllElementsInDocument() { doc.query("http://*"); } </code> </pre> </td> </tr> </tbody> </table> <br /> <p>除基准性能试外,旉试在网l测试方面也很有用.如果一个远端的L或数据当掉或太慢Q你可以跌此测试而不用阻塞在q里Q好的测试集可以在作?jin)一些改动后很快的一遍一遍的执行Q可能一天数十次Q设|一个超时让试更快的执行,下面的示例中如果分析http://www.ibiblio.org/xml 的时间超q2U,则测试失败.</p> <table cellspacing="0" cellpadding="5" width="100%" bgcolor="#eeeeee" border="1"> <tbody> <tr> <td> <pre> <code class="section"> @Test(timeout=2000) public void remoteBaseRelativeResolutionWithDirectory() throws IOException, ParsingException { builder.build("http://www.ibiblio.org/xml"); } </code> </pre> </td> </tr> </tbody> </table> <br /> <br /> <table class="no-print" cellspacing="0" cellpadding="0" align="right"> <tbody> <tr align="right"> <td> <table cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td valign="center"> <br /> </td> <td valign="top" align="right"> <a class="fbox" href="/margiex#main"> <b> <font color="#006bad">Back to top</font> </b> </a> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <br /> <br /> <p> <a name="N101CD"> <span id="rldlv7v" class="atitle"> <strong>新的断言</strong> </span> </a> </p> <p>JUnit 4 增加?jin)两上断文方法用于比较数l:(x)</p> <table cellspacing="0" cellpadding="5" width="100%" bgcolor="#eeeeee" border="1"> <tbody> <tr> <td> <pre> <code class="section"> public static void assertEquals(Object[] expected, Object[] actual) public static void assertEquals(String message, Object[] expected, Object[] actual) </code> </pre> </td> </tr> </tbody> </table> <br /> <p>q两个方法采用最直接Ҏ(gu)比较Q如果数l长度相同,且每个对应的元素相同Q则比较成功Q否则不成功Q参Cؓ(f)I的情况也作?jin)考虑Q?<br /></p> <table class="no-print" cellspacing="0" cellpadding="0" align="right"> <tbody> <tr align="right"> <td> <table cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td valign="center"> <br /> </td> <td valign="top" align="right"> <a class="fbox" href="/margiex#main"> <b> <font color="#006bad">Back to top</font> </b> </a> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <br /> <br /> <p> <font face="宋体"> <strong>需要补充的地方</strong> </font> </p> <p>JUnit 4是一个非常基本的框架Q还不是以前版本的升U。JUNIT3的开发h员会(x)发现有些功能没有?</p> <ul> <li> <font face="宋体">最大的特点是没有GUI试界面Q当试正确时是l色条,而出错时U色的,你也可以在Eclipse中集成JUNIT使用Q但JUNIT4既没有AWT也没有SWING的GUI试界面Q?/font> </li> <li> <font face="宋体">另一个让人吃惊的是失败(期望错误Q和错误Q未预计的异帔R误)(j)没有明显区别Q在JUNIT3中开发h员可以区分这两种情况Q而在JUNIT4中不行;</font> </li> <li> <font face="宋体">最后一个特Ҏ(gu)JUNIT中没有用于徏立一堆测试类?code>suite()Ҏ(gu)Q取而代之的是,采用变长参数传递未知数量的试ltest runner?/code></font> </li> </ul> <p>没有GUI试界面的确不方便,但其它改变简化了(jin)JUNIT的用,从当前JUNIT的操作手册和FAQ的数量就知道Q而JUNIT4的文将不会(x)需要这么多?</p> <br /> <table class="no-print" cellspacing="0" cellpadding="0" align="right"> <tbody> <tr align="right"> <td> <table cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td valign="center"> <br /> </td> <td valign="top" align="right"> <a class="fbox" href="/margiex#main"> <b> <font color="#006bad">Back to top</font> </b> </a> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <br /> <br /> <p> <a name="N101FA"> <span id="bdvvn79" class="atitle"> <strong>~译和运行JUnit 4</strong> </span> </a> </p> <p>现在JUnit 4q没有发布编译版本,如果想体验版本的乐趣Q则需要从CVS中获取源代码。分支标{是"Version4" (see <a href="/margiex#resources"><strong><font color="#006bad">Resources</font></strong></a> ).要注意的是大部分文是根据JUNIT3~写的,q未同步更新。需要Java 5才能~译JUnit 4Q因为大量用了(jin)标记Q泛型其其它JDK5中的新特性?</p> <p>执行试的命令行方式与JUNIT3有点区别Q你现在要?<code>org.junit.runner.JUnitCore</code> c进行测试,如下Q?</p> <table cellspacing="0" cellpadding="5" width="100%" bgcolor="#eeeeee" border="1"> <tbody> <tr> <td> <pre> <code class="section"> $ java -classpath .:junit.jar org.junit.runner.JUnitCore TestA TestB TestC... JUnit version 4.0rc1 Time: 0.003 OK (0 tests)</code> </pre> </td> </tr> </tbody> </table> <br /> <p> <a name="N10212"> <span id="jrjrjvn" class="smalltitle"> <strong>兼容?/strong> </span> </a> </p> <p>Beck 和Gamma在努力保持后向和前向兼容性。JUnit 4可以直接q行Ҏ(gu)JUNIT3~写的测试类Q而不用Q何修改,直接各试cȝ全名传递给test runner卛_Qtest runner?x)根据不同的试c调用不同的试框架版本Q?</p> <p>后向兼容性有炚w?ch),卛_JUNIT3中执行根据JUNIT4写的试c,之所以要q样是因为在一个集成环境如Ecplise中,不需要升U到JUNIT4也可以测试JUNIT4的测试类Q从而避免工具IDE的升U。ؓ(f)?jin)让JUNIT4的测试类在JUNI3中能执行Q你需要一个适配c?code><strong>JUnit4TestAdapter</strong>装JUNIT3的测试类Q如下代码:(x)</code></p> <table cellspacing="0" cellpadding="5" width="100%" bgcolor="#eeeeee" border="1"> <tbody> <tr> <td> <pre> <code class="section">public static junit.framework.Test suite() { return new JUnit4TestAdapter(AssertionTest.class); }</code> </pre> </td> </tr> </tbody> </table> <br /> <p>而JAVA斚wQJUNIT4一点兼Ҏ(gu)都没有Q因为完全依赖于JDK5的新Ҏ(gu),因此不可能在JAVA1.4上面执行JUNIT4?/p> <br /> <table class="no-print" cellspacing="0" cellpadding="0" align="right"> <tbody> <tr align="right"> <td> <table cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td valign="center"> <br /> </td> <td valign="top" align="right"> <a class="fbox" href="/margiex#main"> <b> <font color="#006bad">Back to top</font> </b> </a> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <br /> <br /> <p> <strong>q有...</strong> </p> <p>JUnit 4q未l束Q还有许多需要补充,如文,现在不推荐将以前的测试类升到JUNIT4。当然JUNIT4的开发速度很快Q其计划也很快会(x)实现QJAVA1.4的开发h员仍然可以用JUNIT3.8Q而用JAVA5的h员可以考虑是否采用JUNIT4?jin),因?f)在特性上更适合?</p> <br /> <table class="no-print" cellspacing="0" cellpadding="0" align="right"> <tbody> <tr align="right"> <td> <table cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td valign="center"> <br /> </td> <td valign="top" align="right"> <a class="fbox" href="/margiex#main"> <b> <font color="#006bad">Back to top</font> </b> </a> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <br /> <br /> <p> <a name="resources"> <span id="fvdnxpx" class="atitle"> <strong>资源</strong> </span> </a> </p> <ul> <li> <a > <i> <strong> <font color="#006bad">Pragmatic Unit Testing in Java with JUnit</font> </strong> </i> </a> (Andy Hunt and Dave Thomas, Pragmatic Programmers, 2003): An excellent introduction to unit testing.<br /><br /></li> <li> <a > <i> <strong> <font color="#006bad">JUnit Recipes: Practical Methods for Programmer Testing</font> </strong> </i> </a> (J. B. Rainsberger, Manning, 2004): One of the most widely cited and referenced books on JUnit.<br /><br /></li> <li> <a > <strong> <font color="#006bad">TestNG</font> </strong> </a>: Cedric Beust's framework pioneered the annotation based testing style now used in JUnit 4.<br /><br /></li> <li>"<a ><strong><font color="#006bad">TestNG makes Java unit testing a breeze</font></strong></a>" (Filippo Diotalevi, developerWorks, January 2005): An introduction to TestNG.<br /><br /></li> <li>"<a ><strong><font color="#006bad">Incremental development with Ant and JUnit</font></strong></a>" (Malcolm Davis, developerWorks, November 2000): Explores the benefits of unit testing, in particular using Ant and JUnit, with code samples.<br /><br /></li> <li>"<a ><strong><font color="#006bad">Demystifying Extreme Programming: Test-driven programming</font></strong></a>" (Roy Miller, developerWorks, April 2003): Find out how test-driven programming can revolutionize your productivity and quality as a programmer, and learn the mechanics of writing tests.<br /><br /></li> <li>"<a ><strong><font color="#006bad">Keeping critters out of your code</font></strong></a>" (David Carew, et. al., developerWorks, June 2003): Learn how you can use JUnit in conjunction with WebSphere Application Developer. <br /><br /></li> <li>"<a ><strong><font color="#006bad">Measure test coverage with Cobertura</font></strong></a>" (Elliotte Rusty Harold, developerWorks, May 2005): Learn to identify untested code and locate bugs with this handy open source tool. <br /><br /></li> </ul> <br /> <b>下蝲试版本</b> <br /> <ul> <li> <a > <strong> <font color="#006bad">JUnit 4</font> </strong> </a>: Download the newest version of JUnit the SourceForge CVS repository; be sure to use the branch tag "Version4."<br /><br /></li> </ul> </td> </tr> </tbody> </table>原文Q?a href="/margiex">http://www.tkk7.com/margiex</a><img src ="http://www.tkk7.com/xixuui/aggbug/71246.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/xixuui/" target="_blank">阿辉</a> 2006-09-22 09:44 <a href="http://www.tkk7.com/xixuui/archive/2006/09/22/71246.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>从文件中取测试数据进行单元测?/title><link>http://www.tkk7.com/xixuui/archive/2006/09/20/70800.html</link><dc:creator>阿辉</dc:creator><author>阿辉</author><pubDate>Wed, 20 Sep 2006 06:40:00 GMT</pubDate><guid>http://www.tkk7.com/xixuui/archive/2006/09/20/70800.html</guid><wfw:comment>http://www.tkk7.com/xixuui/comments/70800.html</wfw:comment><comments>http://www.tkk7.com/xixuui/archive/2006/09/20/70800.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/xixuui/comments/commentRss/70800.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/xixuui/services/trackbacks/70800.html</trackback:ping><description><![CDATA[ public void testPopSortFromFile() throws IOException<br /> {<br />  @SuppressWarnings("unused")<br />  String line = "";<br />  FileReader myFileReader = new FileReader<font color="#ff0000">("com/liyingcheng/testFiles/TestPopSort.txt");//相对路径<br /></font>  BufferedReader myBufferedReader=new BufferedReader(myFileReader);<br />  while((line = myBufferedReader.readLine())!=null)<br />  {<br />   if(line.startsWith("#"))<br />   {<br />    continue;<br />   }<br />   <br />   String[] tokens = line.split(",");<br />   <br />   int[] actual = {Integer.parseInt(tokens[0]),Integer.parseInt(tokens[1]),Integer.parseInt(tokens[2])};<br />   int[] expected = {Integer.parseInt(tokens[3]),Integer.parseInt(tokens[4]),Integer.parseInt(tokens[5])};<br />   testSinglePopSort(expected,actual);<br />  }<br /> }<br /><img src ="http://www.tkk7.com/xixuui/aggbug/70800.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/xixuui/" target="_blank">阿辉</a> 2006-09-20 14:40 <a href="http://www.tkk7.com/xixuui/archive/2006/09/20/70800.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>junit assert() 使用实例http://www.tkk7.com/xixuui/archive/2006/09/19/70537.html阿辉阿辉Tue, 19 Sep 2006 07:13:00 GMThttp://www.tkk7.com/xixuui/archive/2006/09/19/70537.htmlhttp://www.tkk7.com/xixuui/comments/70537.htmlhttp://www.tkk7.com/xixuui/archive/2006/09/19/70537.html#Feedback1http://www.tkk7.com/xixuui/comments/commentRss/70537.htmlhttp://www.tkk7.com/xixuui/services/trackbacks/70537.htmlpackage com.liyingcheng.netTest;


import com.liyingcheng.net.Sort;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import junit.xiaoxuhui.Sum;


public class SortTest extends TestCase
{
 // Sort popObj = new Sort();

 public SortTest(String name)
 {
  super(name);
 }


 protected void setUp() throws Exception
 {
  super.setUp();
 }


 protected void tearDown() throws Exception
 {
  super.tearDown();
 }


 static public void assertEquals(int[] expected, int[] actual)
 {
  for(int i = 0; i < expected.length; i++)
  {
   assertEquals(null, expected[i], actual[i]);
  }
 }


 public void testPopSort()
 {
  int[] expected = new int[] {1, 2, 3, 4};
  assertEquals(expected, Sort.popSort(new int[] {1, 2, 4, 3}));
  assertEquals(expected, Sort.popSort(new int[] {1, 2, 3, 4}));
  assertEquals(expected, Sort.popSort(new int[] {1, 3, 4, 2}));
  assertEquals(expected, Sort.popSort(new int[] {1, 3, 2, 4}));
  assertEquals(expected, Sort.popSort(new int[] {2, 1, 4, 3}));
  assertEquals(expected, Sort.popSort(new int[] {2, 4, 1, 3}));
  assertEquals(expected, Sort.popSort(new int[] {3, 2, 4, 1}));
  assertEquals(new int[] {1, 2}, Sort.popSort(new int[] {2, 1}));
  // assertEquals(new int[]{1,3,2,4},popObj.popSort(new int[]{1,2,4,3}));
  // assertEquals(new int[]{1,2,3,4},popObj.popSort(new int[]{1,2,4,3}));
 }


 public void testCreateArray()
 {
  assertEquals(4, Sort.createArray(4).length);
 }


 public void testGetSum()
 {
  assertEquals(5050, Sum.getSum(1, 100));
 }


 public void testFalse()
 {
  assertFalse(false);
  assertTrue(true);
 }


 public void testIsNull()
 {
  String str1 = "";
  int[] arr1 = {};
  String str2 = null;
  int[] arr2 = null;
  assertNotNull(str1);
  assertNotNull(arr1);
  assertNull(str2);
  assertNull(arr2);
  // assertNull(str);
 }


 public void testNull()
 {
 }


 public void testNotSame()
 {
  String str1 = "123";
  String str2 = "123";
  String str3 = new String(str1);
  String str4 = new String("123");
  int one = 1;
  int first = 1;
  assertSame(one, first);
  assertSame(str1, str2);
  assertNotSame(str3, str4);
  //fail("hahahahahahahah");
  /*
   * assertNotSame(one,first); assertNotSame(str1,str2);
   */
 }


 public static Test suite()
 {
  TestSuite suite = new TestSuite("Test sort!");
  suite.addTestSuite(SortTest.class);
  return suite;
 }

}



阿辉 2006-09-19 15:13 发表评论
]]>
junit数组比较http://www.tkk7.com/xixuui/archive/2006/09/18/70350.html阿辉阿辉Mon, 18 Sep 2006 09:30:00 GMThttp://www.tkk7.com/xixuui/archive/2006/09/18/70350.htmlhttp://www.tkk7.com/xixuui/comments/70350.htmlhttp://www.tkk7.com/xixuui/archive/2006/09/18/70350.html#Feedback0http://www.tkk7.com/xixuui/comments/commentRss/70350.htmlhttp://www.tkk7.com/xixuui/services/trackbacks/70350.html/**
  * Asserts that two int arrays are equal. If they are not an
  * AssertionFailedError is thrown.
  */
 static public void assertEquals(int[] expected, int[] actual )
 {
  for(int i = 0; i < expected.length; i++)
  {
   assertEquals(null, expected[i], actual[i]);
  }
 }


阿辉 2006-09-18 17:30 发表评论
]]>
TestSuite的?/title><link>http://www.tkk7.com/xixuui/archive/2006/09/18/70275.html</link><dc:creator>阿辉</dc:creator><author>阿辉</author><pubDate>Mon, 18 Sep 2006 05:59:00 GMT</pubDate><guid>http://www.tkk7.com/xixuui/archive/2006/09/18/70275.html</guid><wfw:comment>http://www.tkk7.com/xixuui/comments/70275.html</wfw:comment><comments>http://www.tkk7.com/xixuui/archive/2006/09/18/70275.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/xixuui/comments/commentRss/70275.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/xixuui/services/trackbacks/70275.html</trackback:ping><description><![CDATA[(zhn)定义自qTestCaseQƈ使用TestRunner来运行测试,事实上TestRunnerq不直接q行 TestCase上的单元Ҏ(gu)Q而是透过TestSuiteQTestSuite可以数个TestCase在一P而让每个TestCase保持单?br /><br />来看看一个例子:(x)<br /><ul><li>MathToolTest.java </li></ul><pre>package onlyfun.caterpillar.test;<br /><br />import onlyfun.caterpillar.MathTool;<br />import junit.framework.TestCase;<br /><br />public class MathToolTest extends TestCase {<br /> public MathToolTest(String testMethod) {<br /> super(testMethod);<br /> }<br /><br /> public void testGcd() {<br /> assertEquals(5, MathTool.gcd(10, 5));<br /> }<br /><br /> public static void main(String[] args) {<br /> junit.textui.TestRunner.run(MathToolTest.class);<br /> }<br />}</pre><br />在这个例子中Q?zhn)q没有看CQ何的TestSuiteQ事实上Q如果?zhn)没有提供M的TestSuiteQTestRunner?x)自己徏立一个,然後q个 TestSuite?x)用反(reflectionQ自动找出testXXX()Ҏ(gu)?br /><br />如果(zhn)要自行生成TestSuiteQ则在承TestCase之後Q提供静态的QstaticQ的suite()Ҏ(gu)Q例如:(x)<br /><div style="MARGIN-LEFT: 40px"><span style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace">public static Test suite() {</span><br style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace" /><span style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace">     return new TestSuite(MathTool.class);</span><br style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace" /><span style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace">}</span><br /></div><br />如果(zhn)没有提供Q何的TestSuiteQ则TestRunner׃(x)像上面这栯动ؓ(f)(zhn)徏立一个,q找出testXXX()Ҏ(gu)Q?zhn)也可以如下面定?suite()Ҏ(gu)Q?br /><div style="MARGIN-LEFT: 40px"><span style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace">public static Test suite() {</span><br style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace" /><span style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace">     TestSuite suite = new TestSuite(MathTool.class);</span><br style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace" /><span style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace">     suite.addTest(new MathToolTest("testGcd"));</span><br style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace" /><span style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace">     return suite;</span><br style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace" /><span style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace">}</span><br /></div> <br />JUnitq没有规定?zhn)一定要使用testXXX()q样的方式来命名(zhn)的试Ҏ(gu)Q如果?zhn)要提供自qҎ(gu)Q当然JUnit 鼓励(zhn)用testXXX()q样的方法名Uͼ(j)Q则可以如上撰写Qؓ(f)?jin)要能够使用建构函式提供试?gu)名称Q?zhn)的TestCase必须提供如下的徏构函 式:(x)<br /><div style="MARGIN-LEFT: 40px"><span style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace">public MathToolTest(String testMethod) {</span><br style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace" /><span style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace">    super(testMethod);</span><br style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace" /><span style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace">}</span><br /></div> <br /><br />如果要加入更多的试Ҏ(gu)Q用addTest()可以了(jin)Qsuite()Ҏ(gu)传回一个TestSuite物gQ它?TestCase都实作了(jin)Test介面QTestRunner?x)调用TestSuite上的run()Ҏ(gu)Q然後TestSuite?x)将之委托?TestCase上的run()Ҏ(gu)Qƈ执行每一个testXXX()Ҏ(gu)?br /><br />除了(jin)l合TestCase之外Q?zhn)q可以将CTestSuitel合在一P例如Q?br /><div style="MARGIN-LEFT: 40px"><span style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace">public static Test suite() { </span><br style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace" /><span style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace">    TestSuite suite= new TestSuite(); </span><br style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace" /><span style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace">    suite.addTestSuite(TestCase1.class);</span><br style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace" /><span style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace">    suite.addTestSuite(TestCase2.class); </span><br style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace" /><span style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace">    return suite; </span><br style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace" /><span style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace">}</span><br /></div> <br />如此之来Q?zhn)可以一ơ运行所有的试Q而不必个别的q行每一个测试案例,(zhn)可以写一个运行全部测试的L试,而在使用TestRunner时呼?suite()Ҏ(gu)Q例如:(x)<br /><div style="MARGIN-LEFT: 40px"><span id="p795z3l" class="postbody"></span><span style="FONT-WEIGHT: bold; FONT-FAMILY: Courier New,Courier,monospace">junit.textui.TestRunner.run(TestAll.suite());</span><br /></div><br />TestCase与TestSuite都实作了(jin)Test介面Q其q行方式?Command 模式 的一个实例,而TestSuite可以l合CTestSuite或TestCaseQ这?Composite 模式 的一个实例?img src ="http://www.tkk7.com/xixuui/aggbug/70275.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/xixuui/" target="_blank">阿辉</a> 2006-09-18 13:59 <a href="http://www.tkk7.com/xixuui/archive/2006/09/18/70275.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>лǵվܻԴȤ</p> <a href="http://www.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> վ֩ģ壺 <a href="http://jmzc888.com" target="_blank">ëƬѹۿַ</a>| <a href="http://hdznzdh.com" target="_blank">ëƬպëƬ</a>| <a href="http://51nianyefan.com" target="_blank">hƵ</a>| <a href="http://zgfxshop.com" target="_blank">һŮ</a>| <a href="http://k8h9.com" target="_blank">Ůһ</a>| <a href="http://ninidian.com" target="_blank">޾Ʒٸ30P</a>| <a href="http://lyaa60.com" target="_blank">ҹþAAAAAëƬѿ</a>| <a href="http://zqsplc.com" target="_blank">ůůձ</a>| <a href="http://gs168sz.com" target="_blank">ˬָ߳ëƬѿ</a>| <a href="http://www961dd.com" target="_blank">պһ</a>| <a href="http://426366.com" target="_blank">91޹߲ҹ</a>| <a href="http://ulihix.com" target="_blank">޾Ʒsuvһ88</a>| <a href="http://trio2003.com" target="_blank">ƴƬ30ӹƷ </a>| <a href="http://adcbgy.com" target="_blank">ˬִ̼߳Ƶ</a>| <a href="http://trgod.com" target="_blank">ëƬӰƬ</a>| <a href="http://ruidamo.com" target="_blank">ɫ͵ר</a>| <a href="http://22222xxx.com" target="_blank">У԰ɫС˵</a>| <a href="http://glhrsydc.com" target="_blank">ëƬѲ</a>| <a href="http://bjmyhfc.com" target="_blank">㽶þۺӰ</a>| <a href="http://lshwork.com" target="_blank">޳AVƬWWW</a>| <a href="http://3x79.com" target="_blank">þۺϾɫۺ97</a>| <a href="http://yuntao360.com" target="_blank">˸徫Ʒ</a>| <a href="http://lhtjdj.com" target="_blank">ѹۿһëƬ</a>| <a href="http://b2bautoparts.com" target="_blank">þþƷAV͵</a>| <a href="http://tsxyhq.com" target="_blank">պһѲ</a>| <a href="http://0939666.com" target="_blank">18ڵվ </a>| <a href="http://bj-tkld.com" target="_blank">ѿwwwƵ</a>| <a href="http://lshwork.com" target="_blank">2019ҹ</a>| <a href="http://taojin5.com" target="_blank">þþþþþõѲ</a>| <a href="http://bisilover.com" target="_blank">޾ƷۺϾþһ</a>| <a href="http://hberay.com" target="_blank">avպavӰ</a>| <a href="http://ystchem.com" target="_blank">ò߹ۿƵ</a>| <a href="http://sh-lkby.com" target="_blank">ĻۺϾƷһ</a>| <a href="http://yeyaweiban.com" target="_blank">þù׾Ʒһ</a>| <a href="http://666mou.com" target="_blank">պvavaŷva</a>| <a href="http://lkzrgy.com" target="_blank">߹ۿƵ</a>| <a href="http://haichuanwangluo.com" target="_blank">ĻӰԺ</a>| <a href="http://50077995.com" target="_blank">ʪôýˬƵ</a>| <a href="http://863409.com" target="_blank">Ļ</a>| <a href="http://hongyue8.com" target="_blank">avƬ߹ۿվ</a>| <a href="http://ahbbht.com" target="_blank">ۺƵ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>