testThatTheMachineTurnsOn
This commit is contained in:
		
							parent
							
								
									b3bc058c1d
								
							
						
					
					
						commit
						9345b4e3f9
					
				
					 1 changed files with 9 additions and 0 deletions
				
			
		| 
						 | 
					@ -11,6 +11,15 @@ import XCTest
 | 
				
			||||||
 | 
					
 | 
				
			||||||
let alphaSeries = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 | 
					let alphaSeries = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class MachineTests: XCTestCase {
 | 
				
			||||||
 | 
					    func testThatItTurnsOn() {
 | 
				
			||||||
 | 
					        let machine = try! Machine(rotors: [Rotor(.EnigmaI), Rotor(.EnigmaII), Rotor(.EnigmaIII)], reflector: Reflector(.EnigmaB), plugboard: Plugboard())
 | 
				
			||||||
 | 
					        print(try! machine.encode("A"))
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class RotorTests: XCTestCase {
 | 
					class RotorTests: XCTestCase {
 | 
				
			||||||
    let rotorSeries = "EKMFLGDQVZNTOWYHXUSPAIBRCJ"
 | 
					    let rotorSeries = "EKMFLGDQVZNTOWYHXUSPAIBRCJ"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue