Skip to content

Commit

Permalink
More Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adamisntdead committed Jan 18, 2017
1 parent cbf1470 commit 1e1ca87
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ def testCNOT(self):
self.assertEqual(CNOT2.measure(), '0010001000')
self.assertEqual(CNOT3.measure(), '001000000')

def testRemeasure(self):
self.assertEqual(CNOT1.measure(), '0000000000')
self.assertEqual(CNOT2.measure(), '0010001000')
self.assertEqual(CNOT3.measure(), '001000000')

def testReapplyGate(self):
with self.assertRaises(ValueError):
CNOT1.applyGate('X', 4)


def main():
unittest.main()
Expand Down

0 comments on commit 1e1ca87

Please sign in to comment.