'Testing that number of decision points and exit points are calculated
correctly.'

def test_calculation(self):

    expected = [('used(int,    int)', 3), ('returned(int,    int)', 1), ('loopy(int,    int)', 5), ('in_condition(int,    int)', 1), ('assignation(int,    int)', 2), ('arithmetics(int,    int)', 1), ('levels(int,    int,    int)', 10), ('structing(struct    test_struct,    struct    test_struct    *)', 1), ('switching(int,    int)', 2)]
    root = Index.create().parse(self.filename).cursor
    complexities_gen = self.bear.complexities(root, self.filename)
    results = [(cursor.displayname, complexity) for (cursor, complexity) in complexities_gen]
    self.assertSequenceEqual(results, expected)
