| 1 |
# DExTer : Debugging Experience Tester |
| 2 |
# ~~~~~~ ~ ~~ ~ ~~ |
| 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-exception |
| 7 |
|
| 8 |
|
| 9 |
class StepValueInfo(object): |
| 10 |
def __init__(self, step_index, watch_info, expected_value): |
| 11 |
self.step_index = step_index |
| 12 |
self.watch_info = watch_info |
| 13 |
self.expected_value = expected_value |
| 14 |
|
| 15 |
def __str__(self): |
| 16 |
return "{}:{}: expected value:{}".format( |
| 17 |
self.step_index, self.watch_info, self.expected_value |
| 18 |
) |
| 19 |
|
| 20 |
def __eq__(self, other): |
| 21 |
return ( |
| 22 |
self.watch_info.expression == other.watch_info.expression |
| 23 |
and self.expected_value == other.expected_value |
| 24 |
) |
| 25 |
|
| 26 |
def __hash__(self): |
| 27 |
return hash(self.watch_info.expression, self.expected_value) |