A remember about the Periodic Table test which will be added next week on the 23rd.
我要提醒你们,下周23号将会有个周期表测试。
which basically, I don't really know they haven't done any examination or any test, any tests.
事实上,我真的不知道他们做过任何考试或者测试没有。
If I test right up until the last thing I say, I don't think that gives you enough dwell time.
如果我正好测试我刚刚讲过的东西,我并不认为我会给你们足够的思考时间。
A test suite that will make us feel good about things. For now, I just want you to be aware that you're always doing this balancing act.
测试集呢?一个测试集会让我们的工作,变的舒服多了,现在,我只是想让,大家意识到你们经常需要做这种协调工作。
I know that your teaching fellows will have handed out a meter exercise for you.
我知道助教们会,发给你们一个韵律测试。
This is not really a quiz cause we're not going to collect it.
这不是一个正式的测试,因为我不会把它们收上来
Now I'm going to give you another little pop quiz here.
现在,我想再进行一个小测试
I've got a really bad grade on my test.
我在一门测试中考了一个很差的成绩。
What I am talking about today, I will not be testing you, but maybe you might pay attention because about a month from now we will ask you a few skill testing questions about it.
我说的是今天,我等会不会测试你,但是你可能会重视了,因为一个月之前,我们问了你关于一些测试的技能。
Wednesday will be the test, Test 1, and I will say a few words about that, coverage through the end of lecture on Wednesday.
星期三会有测试,测试,我将说一些关于考试的事,周三的考试内容,涉及到这节课的末尾部分。
I'm going to throw it, or raise it, to use the right term to somebody in case they can handle it, but it's a particular kind of exception I might do something like, remind you I have test.
编译器就要抛出他或者提出它,用正确的描述给某个人来处理,但他的确是一种异常,我来做些类似的事情,告诉你我有些测试。
And I end up going back and doing unit testing anyway, to try and figure out why it doesn't work. So over the years, I've just convinced myself I might as well start where I'm going to end up.
第一次从来不会正常运行,因此无论如何我还要回头去做单元测试,找找哪儿出错了,因此经过这么多年,我已经说服自己既然一定要做单元测试,那么还是一开始就做最好了。
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次,但是我现在不想用这个来烦你们。
Figure out what I'm trying to walk through What's the collection of things I'm trying to walk through. Figure out what I want to do at each stage. Figure out what the end test is.
弄清楚需要遍历的东西,弄清楚我需要遍历的东西的集合,弄清楚我在每一步该做什么,弄清楚终结测试。
Let's check it out. I've written a little bit of a test script here, so if we test cell sort, and I've written this so that it's going to print out what the list is at the end of each round, OK.
我们来检查检查,我写了一个小测试脚本,我写这个脚本来测试单元排序,它能够打印出每一轮结束后,链表的是什么样子的。
Because usually it doesn't work. And so one of the things that I think is very important is to always begin by testing each unit.
因此我认为非常重要的一件事情,就是开始测试的时候先对,每个独立单元进行测试。
And I'm going to do it only using multiplication and addition and some simple tests. All right?
我只能用乘法和加法,以及一些小测试来解决这个问题?
First one, when I write a piece of code, especially code that has branches in it, when I design test cases for that piece of code, I should try and have a specific test case for each possible path through the code.
第一点,当我们写代码的时候,尤其是一些含有分支语句的代码的时候,当我为这些代码,设计测试用例的时候,我应该为每一个可能的程序路径,都设计一个特别的用例。
This way I can torture you between tests by asking you questions.
这个方法可以停止显示,用这招我可以在测试的时候。
It's Bush economics. OK? I know.
啊,测试答案为否了,因此我返回5,对,没错。
I would love to make predictions that you cannot test.
我很乐意做一些你们无法测试出的预测。
So here's my unit test procedure.
所以这就是我的单元测试流程。
Why do I give you a test?
我为什么要给你一个测试?
I now have multiple tests.
我现在有了很多测试比较。
In this case, I probably want to make sure I use absolute value of x before I carry it on. Yes ma'am.
在这个例子中,我可能想确定,在进行测试前我用的是x的绝对值,什么问题?
The beauty of this is, it keeps me from getting lazy, and not only testing my program and the thing that found the bug, but in all the things that used to work.
运行函数而不用再输入了,这其中的,美妙之处在于,它让我变的勤快了点,并不是仅仅的去测试程序发现bug方面,同样适用于那些正常工作的模块。
I can build class stock, and I can test class stock, before I have a class market.
我可以建立一个stock类,然后在有macket类之前测试这个类。
I'm doing a test there to say, x if the string x is less than the value of b, and x does not appear before b as strings, then I was going to do, oh, a couple of things, because they're at the same block level.
我正在做一个测试来看看,字符串,是不是小于b的值,而且x不在b之前作为字符串出现,如果是真的话我就要做,一系列的操作,因为他们是在同一个块等级上。
I'm expecting the value that test to be a Boolean. Followed by a colon.
我希望测试的结果值的类型,是Boolean的,后面是个冒号。
It's not how well you can memorize facts: John in fact, I think both John and I are a little sensitive to memory tests, given our age, right John?
这实际上不是考察你们的记忆能力的:,实际上,我想我和,因为我们年纪的原因,对记忆力测试都有点敏感,对不对John?
应用推荐