Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2702 for trunk


Ignore:
Timestamp:
01/28/10 16:49:43 (15 years ago)
Author:
mkommend
Message:

removed test cases in MainFormManager ctor (ticket #857)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.MainForm/3.2/MainFormManager.cs

    r2696 r2702  
    4040      views = new HashSet<Type>();
    4141      defaultViews = new Dictionary<Type, Type>();
    42 
    43       Type listString = typeof(List<string>);
    44       Type list = typeof(List<>);
    45       Type ilist = typeof(IList<>);
    46       Type stringStringDict = typeof(Dictionary<string, string>);
    47       Type dict = typeof(Dictionary<,>);
    48       Type stringDict = typeof(StringDict<>);
    49       Type stringIntDict = typeof(StringDict<int>);
    50       Type stringStringDict2 = typeof(StringDict<string>);
    51 
    52       bool result;
    53       result = listString.IsAssignableTo(list);
    54       Debug.Assert(result);
    55 
    56       Debug.Assert(stringStringDict2.IsAssignableTo(stringDict));
    57       Debug.Assert(stringStringDict2.IsAssignableTo(stringStringDict));
    58       Debug.Assert(stringStringDict2.IsAssignableTo(dict));
    59       Debug.Assert(!stringStringDict2.IsAssignableTo(stringIntDict));
    60       Debug.Assert(!stringIntDict.IsAssignableTo(stringStringDict));
    61 
    62       result = list.IsAssignableTo(ilist);
    63       Debug.Assert(result);
    64       result = listString.IsAssignableTo(ilist);
    65       Debug.Assert(result);
    66       result = list.IsAssignableTo(listString);
    67       Debug.Assert(!result);
    68       result = ilist.IsAssignableTo(listString);
    69       Debug.Assert(!result);
    70       result = ilist.IsAssignableTo(list);
    71       Debug.Assert(!result);
    72 
    73       Type stackedListList = list.MakeGenericType(typeof(List<>));
    74       Type stackedListListint = typeof(List<List<int>>);
    75       Type istackedListListint = typeof(IList<List<int>>);
    76       Type stackedListIListint = typeof(List<IList<int>>);
    77       Debug.Assert(stackedListListint.IsAssignableTo(list));
    78       Debug.Assert(stackedListListint.IsAssignableTo(ilist));
    79       Debug.Assert(!stackedListListint.IsAssignableTo(listString));
    80       Debug.Assert(stackedListListint.IsAssignableTo(istackedListListint));
    81       Debug.Assert(!stackedListListint.IsAssignableTo(stackedListIListint));
    8242    }
    8343
Note: See TracChangeset for help on using the changeset viewer.