brintos

brintos / llvm-project-archived public Read only

0
0
Text · 923 B · 92cd576 Raw
28 lines · python
1# DExTer : Debugging Experience Tester2# ~~~~~~   ~         ~~         ~   ~~3#4# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.5# See https://llvm.org/LICENSE.txt for license information.6# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception7 8 9class StepValueInfo(object):10    def __init__(self, step_index, watch_info, expected_value):11        self.step_index = step_index12        self.watch_info = watch_info13        self.expected_value = expected_value14 15    def __str__(self):16        return "{}:{}: expected value:{}".format(17            self.step_index, self.watch_info, self.expected_value18        )19 20    def __eq__(self, other):21        return (22            self.watch_info.expression == other.watch_info.expression23            and self.expected_value == other.expected_value24        )25 26    def __hash__(self):27        return hash(self.watch_info.expression, self.expected_value)28