1 / 13

Testing Your Procedures

Join us for a workshop on Testing Procedures on Sept. 16th, 2019. The agenda includes preliminaries, quiz debrief, testing, lab time, and wrap-up. Get insights on peer support events, soccer game, CS table, lab writeup, exam, and reading assignments. The quiz debrief session covers complex problem breakdowns with detailed explanations and examples. Learn about test cases, test suites, and test-driven development during the testing segment. Lab time will focus on exercises while the wrap-up will include reminders on upcoming assignments and exams.

dmorrow
Download Presentation

Testing Your Procedures

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Sept 16th, 2019 Testing Your Procedures

  2. Agenda • Preliminaries (8:30-8:35) • Quiz Debrief (8:35-8:55) • Testing (8:55-9:05) • Lab Time (9:05-9:45) • Wrap-up (9:45-9:50)

  3. Preliminaries (8:30-8:35) • Peer Support Events? • Women's soccer game Wednesday at 4pm • CS Table Tuesday at noon • Upcoming Work: • Lab writeup due 10:30pm on Wednesday • Exam 1 goes live on Wednesday • Reading for Wednesday • Quiz on Friday

  4. Quiz Debrief (8:35-8:55) • This was a hard one • Reminder about individual tutors • Dropped last question, too hard

  5. Quiz Debrief (8:35-8:55) • (mouse 5) • ((o dog increment) 5) • ((o (section * <> 2) increment) 5) • Composition is applied right to left • First we increment to get 6 • Then 6 is passed to the section procedure • Section procedure is 6 * 2 to get 12

  6. Quiz Debrief (8:35-8:55) • (moose squirrel) • ((o sqrt (section + <> 5)) 11) • First we apply the section procedure: 11 + 5 = 16 • Then we apply the square root: 4

  7. Quiz Debrief (8:35-8:55) • ((section - <> 2) 5) • The section procedure is an anonymous procedure, but still a valid procedure • 5 is passed to the section procedure: 5 - 2 = 3

  8. Quiz Debrief (8:35-8:55) • (map dog (iota 6)) • (map (section * <> 2) (iota 6)) • (map (section * <> 2) (list 0 1 2 3 4 5)) • Map means that we pass each of the numbers into the anonymous procedure defined by section: ‘(0 2 4 6 8 10)

  9. Quiz Debrief (8:35-8:55) • How to make ‘(1 2 3 4 5 6)? • a is ’(1 2 3) and b is ‘(4 5 6), so (append a b) • How to make ‘(1 2 5 6)? • First two numbers of a: (take a 2) • Last two numbers of b: (drop b 1) • (append (take a 2) (drop b 1) • Last question was dropped, too hard

  10. Quiz Debrief (8:35-8:55) • Input and output types: • map takes a procedure and a list to apply that procedure to (the procedure might be anonymous and that’s okay!) • section takes one input per <> and creates a procedure • o takes one or more procedures and creates a procedure

  11. Testing (8:55-9:05) • Think-pair-share: • What is a test case? • A single test, check if a procedure is doing what you think it should, single post condition • What is a test suite? • Series of test cases, grouped somehow • When should we write tests? • Anytime you write a procedure, after?, when you know what the post conditions should be, in conjunction with documentation, could write before (test-driven development)

  12. Lab Time (9:05-9:45)

  13. Wrap-up (9:45-9:50) • Upcoming Work: • Lab writeup: Exercise 3b, c, and d due 10:30pm on Wednesday • Assignment 3 due Tuesday at 10:30pm • Exam 1 goes live on Wednesday • Reading for Wednesday

More Related