All right. So we've got it now let's test it. So we're going to do here we're going to run compare methods.
很抱歉,那些坐在后面的同学,想往前面来的请自便,我们已经做好准备,让我们去试一下,我们接下来将要做的就是。
I should really just put it in a nice test harness, where I run 100, 200, 1,000 trials, but I didn't want to bore you with that here.
我应该把它放到一个测试组件中,我运行100次,200次,1000次,但是我现在不想用这个来烦你们。
That was the kind of thing you saw. Asserts said here are some conditions to test. If they're true, I'm going to let the rest of the code run.
这就是你看到的,断言是一些测试条件,如果他们为真。
So before I try and run my program, I test each part of it independently.
因此在我尝试运行我的程序之前,我都会对它的每个部分进行独立的测试。
So let's assume we've run our test suite.
让我们假设已经运行了测试集。
We'll run test bi. Whoops!
我运行下test,bi试试,喔!
应用推荐