统计结果:
次数 不相交 相交于一个区域 包含 重合 交点为1个点 点为1条线段 A错误格式 B错误格式 1 2 3 2076 2051 2007 1474 1536 1524 209 204 197 0 0 0 0 0 0 1 12 11 16 80479 80605 80594 15750 15593 15661 命中率 0.204466667 0.151133333 0.020333333
3.33333E-05 0.0013 8.055933333 1.5668
(2) 等价类划分
测试用例(双击打开和编辑)
序号12345678910111213141516171819202122232425262728A.left-165055555555555555555555565555A.right555-1650101010101010101010101010101010101010910101010A.top55555-1650555555555555555565555A.bottB.righB.leftomt1010101010555-1650101010101010101010101010109101010105555555555-1650555555551576551010510101010101010101010555-16501010101010201291010151510B.top555555555555555-165055515765510510B.bottom101010101010101010101010101010555-16502012965010151015期望输出A输入错误A输入错误A输入错误A输入错误A输入错误A输入错误A输入错误A输入错误A输入错误A输入错误B输入错误B输入错误B输入错误B输入错误B输入错误B输入错误B输入错误B输入错误B输入错误B输入错误不相交相交包含包含重合相交一个点相交一条线相交一条线实际输出A输入错误A输入错误A输入错误A输入错误A输入错误A输入错误A输入错误A输入错误A输入错误A输入错误B输入错误B输入错误B输入错误B输入错误B输入错误B输入错误B输入错误B输入错误B输入错误B输入错误不相交相交包含包含重合相交一个点相交一条线相交一条线 (3) 已在visio中画好,双击可打开编辑
Starint nMaxLeftint nMaxTop1N2Y39int nMinRightint nMinBottomY38NN403736N3nMaxLeft = B.leftYYNNNYYNYnMaxLeft = A.leftif (A.left >= B.left)3233344nMaxTop = A.topif (A.top >= B.topnMaxTop = B.top5YNNN41292430YYNY252627nMinRight = A.rightif (A.right <= B.right)nMinRight = B.rightY78NNNnMinBottom = A.bottomif (A.bottom <= B.bottom)if ((nMaxLeft > nMinRight) || (nMaxTop > nMinBottom))nMinBotnFlag = tom = 1;B.bottom area = (nMinRight - nMaxLeft + 1 ) * (nMinBottom - nMaxTop + 1)nFlag=0else if (((nMaxLeft==A.left) && (nMinRight==A.right) && (nMaxTop==A.top) && (nMinBottom==A.bottom)) ||((nMaxLeft==B.left) && (nMinRight==B.right) && (nMaxTop==B.top) && (nMinBottom==B.bottom)))nFlag=2if ((B.left==A.left) && (B.right==A.right) && (B.top==A.top) && (B.bottom==A.bottom))9Y10NN1112else if ((nMaxLeft==nMinRight) && (nMaxTop == nMinBottom))nFlag=4else if (((nMaxLeft==nMinRight) && (nMaxTop < nMinBottom))nFlag=5nFlag=3Y13N14NN15N16NYYN17YYYYENDV(g)=24+1=25L1:1-2-3-4-6-7-9-10-12-13-15-17-41L2:1-2-3-5-6-7-9-10-12-13-15-17-41L3:1-2-3-4-6-8-9-10-12-13-15-17-41L4:1-2-3-4-6-7-9-11-12-13-15-17-41L5:1-2-3-4-6-7-9-10-12-14-15-17-41L6:1-2-3-4-6-7-9-10-12-13-15-16-17-41L7:1-2-3-4-6-7-9-10-12-13-15-16-18-20-21-22-23-41L8:1-2-3-4-6-7-9-10-12-13-15-16-18-19-24-25-26-27-32-41L9:1-2-3-4-6-7-9-10-12-13-15-16-18-19-20-24-25-26-27-32-41L10:1-2-3-4-6-7-9-10-12-13-15-16-18-19-20-21-24-26-27-32-41L11: 1-2-3-4-6-7-9-10-12-13-15-16-18-19-20-21-22-24-26-27-32-41L12: 1-2-3-4-6-7-9-10-12-13-15-16-18-19-24-28-29-30-31-32-41L13: 1-2-3-4-6-7-9-10-12-13-15-16-18-19-24-25-28-29-30-31-32-41L14: 1-2-3-4-6-7-9-10-12-13-15-16-18-19-24-25-26-28-29-30-31-32-41L15:1-2-3-4-6-7-9-10-12-13-15-16-18-19-24-25-26-27-28-29-30-31-32-41L16: 1-2-3-4-6-7-9-10-12-13-15-16-18-19-24-25-26-27-32-41L17: 1-2-3-4-6-7-9-10-12-13-15-16-18-19-24-28-29-33-34-35-41L18: 1-2-3-4-6-7-9-10-12-13-15-16-18-19-24-28-29-30-33-34-35-41L19: 1-2-3-4-6-7-9-10-12-13-15-16-18-19-24-28-29-30-31-33-34-35-41L20: 1-2-3-4-6-7-9-10-12-13-15-16-18-19-24-28-39-30-31-32-41L21: 1-2-3-4-6-7-9-10-12-13-15-16-18-19-24-28-33-34-36-37-40-41L22: 1-2-3-4-6-7-9-10-12-13-15-16-18-19-24-28-33-34-36-38-39-40-41L23: 1-2-3-4-6-7-9-10-12-13-15-16-18-19-24-28-33-34-36-37-38-41L24: 1-2-3-4-6-7-9-10-12-13-15-16-18-19-24-28-33-34-36-37-38-39-41L25: 1-2-3-4-6-7-9-10-12-13-15-16-18-19-24-28-33-36-37-40-4118192021222328316N35YYYY
测试用例:
测试路径 A.left A.top A.right A.bottom B.left B.top B.right B.bottom 期望输出 实际输出