1 classdef mlunit_test_diskbasedhashmap_nostorage < matlab.unittest.TestCase
2 properties (Access=
private)
10 self = self@matlab.unittest.TestCase(varargin{:});
13 methods (TestMethodSetup)
14 function self = setUp(self)
17 'testBranch','storageFormat','none');
21 'gamma',{{[1 2 3],[1 2 3]}},...
22 'delta',{{[1 2 3], [4 5 6]}},...
23 'epsilon',{{
'nu',
'mu'}},...
24 'zeta',int16([144 1]),...
25 'eta',logical([1 1]),...
26 'theta',{{
'nu',
'nu'}},...
27 'iota',{{
'nu',
'mu'}});
30 'gamma',{{[1 2 3],[1 2 44545453]}},...
31 'delta',{{[1 2.676676734 3], [4.23232423423424 5 6]}},...
32 'epsilon',{{
'nu',
'mu'}},...
33 'zeta',int8([431 2121]),...
34 'eta',logical([1 0]),...
35 'theta',{{
'nu',
'nu'}},...
36 'iota',{{
'nu',
'mu'}});
41 function self=test_putGet(
self)
42 rel1=self.rel1; %
#ok<*PROP> 44 inpObjList={rel1,rel2};
45 keyList={
'rel1',
'rel2'};
46 self.map.put(keyList,inpObjList);
47 isThere=fliplr(
self.map.isKey(fliplr(keyList)));
48 isEqual=any(isThere==
true);
49 self.verifyEqual(isEqual,
false);
52 function self=test_getKeyList(
self)
55 inpObjList={rel1,rel2};
56 keyList={
'rel1',
'rel2'};
57 self.map.put(keyList,inpObjList);
58 isEqual=isequal({},
self.map.getKeyList);
59 self.verifyEqual(isEqual,
true);
60 self.map.remove(
'rel2');
61 isEqual=isequal({},
self.map.getKeyList);
62 self.verifyEqual(isEqual,
true);
65 function self=test_isKeyAndRemove(
self)
69 inpObjList={rel1,rel2,rel3};
70 keyList={
'rel1',
'rel2',
'rel3'};
71 self.map.put(keyList,inpObjList);
72 self.map.remove(keyList{3});
73 self.verifyEqual(
self.map.isKey(keyList{3}),
false);
75 isThere=fliplr(
self.map.isKey(fliplr(keyList)));
76 isEqual=any(isThere==
true);
77 self.verifyEqual(isEqual,
false);
80 function self=test_getFileNameByKey(
self)
84 self.map.put(keyList,inpObjList);
85 self.map.getFileNameByKey(keyList);