-
Notifications
You must be signed in to change notification settings - Fork 165
Expand file tree
/
Copy pathPlotlyTestCaseAny.m
More file actions
38 lines (36 loc) · 1.37 KB
/
PlotlyTestCaseAny.m
File metadata and controls
38 lines (36 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
classdef PlotlyTestCaseAny
% PlotlyTestCaseAny Base wildcard matcher for struct comparison
%
% This class represents a wildcard that matches any value during
% struct comparison in PlotlyTestCase.verifyEqualStructs.
%
% Do not instantiate this class directly. Use PlotlyTestCase.Any() instead.
%
% Subclasses can override the match() method to provide custom validation.
%
% Example:
% expected.color = PlotlyTestCase.Any(); % Ignore color field
% testCase.verifyEqualStructs(actual, expected);
methods
function result = match(~, ~)
% match Check if a value matches this matcher
%
% Syntax:
% result = matcher.match(actualValue)
%
% Description:
% Base implementation that matches any value.
% Subclasses can override to provide custom validation.
%
% Output:
% result - Struct with fields:
% .passed - true if match succeeded, false otherwise
% .diagnostic - String describing why match failed (empty if passed)
%
% Example:
% matcher = PlotlyTestCase.Any();
% result = matcher.match('anything'); % result.passed = true
result = struct('passed', true, 'diagnostic', '');
end
end
end