• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
9class 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(self.step_index, self.watch_info, self.expected_value)
17
18    def __eq__(self, other):
19        return (self.watch_info.expression == other.watch_info.expression
20                and self.expected_value == other.expected_value)
21
22    def __hash__(self):
23        return hash(self.watch_info.expression, self.expected_value)
24