
function [sysSummary, blkSummary] = mcdc_summary(testCnt, options)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MCDC_SUMMARY - Produce HTML table templates to
% be combined with templates for other metrics to
% form master templates for block and sytem summary
% tables.

%   Copyright 1990-2015 The MathWorks, Inc.
    if testCnt==1
        totalCol = 1;
    elseif options.cumulativeReport
        totalCol = 3;
    else
        totalCol = testCnt+1;
    end
    
    txtMCDC  = getString(message('Slvnv:simcoverage:mcdcMetric'));
    txtConditionsReversedOutcome = getString(message('Slvnv:simcoverage:cvhtml:ConditionsReversedOutcome'));
    txtNA = getString(message('Slvnv:simcoverage:cvhtml:NA'));
    txtSee = getString(message('Slvnv:simcoverage:cvhtml:CascMCDCSeeRoot'));

    blkSummary = { ...
                    ['$' txtMCDC], ...
                    {'If',{'&isempty','#mcdc.cascadeRoot'}, ...
                        {'Cat', ...
                            {'&in_covperratios',...
                                    {'#mcdc.localHits',totalCol},...
                                    {'#mcdc.justifiedLocalHits',totalCol},...
                                    '#mcdc.localCnt'}, ...
                            ['$ ' txtConditionsReversedOutcome ] ...
                        },  ...
                     'Else', ...
                        {'&in_href', ...
                            {'Cat', ['$' txtSee ' '], '#mcdc.cascadeRoot.name'}, ...
                            '#mcdc.cascadeRoot.cvId'
                        },  ...
                    }, '\n' ...
                 };

    sysSummary = { ...
                    ['$' txtMCDC], ...
                    {'If',{'&isempty','#mcdc.localHits'}, ...
                            ['$' txtNA], ...
                     'Else', ...
                            {'Cat', ...
                                 {'&in_covperratios',...
                                        {'#mcdc.localHits',totalCol},...
                                        {'#mcdc.justifiedLocalHits',totalCol},...
                                        '#mcdc.localCnt'}, ...
                                ['$ ' txtConditionsReversedOutcome ] ...
                            } ...
                    }, ...
                    {'Cat', {'&in_covperratios',...
                                    {'#mcdc.totalHits',totalCol},...
                                    {'#mcdc.justifiedTotalHits',totalCol},...
                                    '#mcdc.totalCnt'}, ['$ ' txtConditionsReversedOutcome ]}, ...
                    '\n'  ...
                 };

