Mercurial > public > cpp-enigma
comparison enigma/tests/test_plugboard.t.h @ 10:232dbe7a3fe0
Added plugboard::unplug_all().
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Fri, 29 Jun 2012 21:26:24 -0500 |
parents | 7362965f53b1 |
children | b9d124a15926 |
comparison
equal
deleted
inserted
replaced
9:7362965f53b1 | 10:232dbe7a3fe0 |
---|---|
305 TS_ASSERT(!pb.is_connected(20, i)); | 305 TS_ASSERT(!pb.is_connected(20, i)); |
306 } | 306 } |
307 } | 307 } |
308 } | 308 } |
309 | 309 |
310 void test_unplug_all() | |
311 { | |
312 plugboard pb; | |
313 pb.connect(5, 7); | |
314 pb.connect(1, 20); | |
315 pb.connect(18, 24); | |
316 pb.unplug_all(); | |
317 for (int i = 0; i < 26; ++i) | |
318 { | |
319 TS_ASSERT(pb.is_free(i)); | |
320 } | |
321 pb.unplug_all(); | |
322 for (int i = 0; i < 26; ++i) | |
323 { | |
324 TS_ASSERT(pb.is_free(i)); | |
325 } | |
326 } | |
327 | |
310 }; | 328 }; |