• 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"""Command for specifying an expected set of values for a particular watch."""
8
9
10from dex.command.commands.DexExpectWatchBase import DexExpectWatchBase
11
12class DexExpectWatchValue(DexExpectWatchBase):
13    """Expect the expression `expr` to evaluate to the list of `values`
14    sequentially.
15
16    DexExpectWatchValue(expr, *values [,**from_line=1][,**to_line=Max]
17                        [,**on_line])
18
19    See Commands.md for more info.
20    """
21
22    @staticmethod
23    def get_name():
24        return __class__.__name__
25
26    def _get_expected_field(self, watch):
27        return watch.value
28