| # Seeds for failure cases proptest has generated in the past. It is | ||
| # automatically read and these particular cases re-run before any | ||
| # novel cases are generated. | ||
| # | ||
| # It is recommended to check this file in to source control so that | ||
| # everyone who runs the test benefits from these saved cases. | ||
| xs 3591451162 2655640551 804983804 3307909230 # shrinks to ref m = {-13697: 30985, 1338: 29274, -14139: -4092, 673: -19662, -19198: 333, 9155: -4794, -24816: -12851, 14658: -17795, 23662: -25253, -4783: -12972, -31711: -1639, -26495: 16710, -7087: -26434, 18175: -4121, 5045: 8040, -23549: 17012, 6304: -7492, -23305: -28186, 606: 8452, -15872: 2415, 17913: 2306, -20500: 28581} | ||
| xs 1457767450 3825624317 1539332905 3279740856 # shrinks to ref m = {7136: -9742, -7547: 13954, -15860: 17017, -31620: -15850, 25480: -13526, 9943: -13939, 1142: 22444, 20378: -26706, -10165: -14641} | ||
| xs 2468731224 2159341902 336190467 4018852179 # shrinks to ref m = {22114: -20101, -30886: -4356, 29938: 40, 6256: -29990, 8450: -21821, 30253: 901, -10781: -24620, 22431: 593} | ||
| xs 1344206258 166909451 3875523340 3155104601 # shrinks to ref m = {25488: 22186, -4852: 28282, -5097: 4497, 29501: 8087, -29096: -18313, 22286: -17383, 30624: 25063, -2270: -1319, 31014: -28777, 23935: 1507} | ||
| xs 2403854785 21349881 2962261870 427550728 # shrinks to ref pairs = [(-17914, 0), (16838, 0)] | ||
| xs 1508395022 1122347352 4113209817 3965614759 # shrinks to ref m = {0: 0, 1: 0} | ||
| xs 1627474128 2843908894 3937915137 1370561421 # shrinks to ref input = {0: 0}, index_rand = 0 | ||
| xs 1863744963 3828268266 3976454353 1279901501 # shrinks to ref m = {1033: ",¦⾘f\u{b}C\u{bae94}}$n\"\u{fc28d}\u{feff}\u{b}-", 2568: "\u{8db77}ꖽ\r\u{7af7f}�7\u{a7bf3}\u{393b9}\u{0}G\u{8}\'%5E\u{cd0dc}?\u{ba311}%\u{ee814}Ѩ\\\u{80aa1}", 3527: "\u{41005}\u{41ff0}$`,L&%\u{1b}~\u{36ada}", 3577: "\u{feff}5\u{109dd9}:\u{8}\u{3}𬃹\u{3c2b6}\\\"5𡂏\'\u{feff}%\u{b8c12}?", 4544: "0*8🕴�\u{33669}\r\"\u{92011}𮡱<\u{0}<\u{1}$\u{1},\u{f1234}{G\u{1b}J\u{ceaa4}\\", 4560: "🕴\r\tѨ@\u{edbda}\u{1b}t�\u{b}\u{2}�ò\u{80090}.\'\u{34690}g%Ѩ\u{0}=\u{1}", 7113: "*", 7944: "¨\u{b6d08}$🕴&{H\rUi\u{feff}\u{0}.¥ô{_*\u{d73fc}:Ѩf`2.*\u{c9c6c}", 8738: "%𬊢*:Ä\u{90}\u{b}\u{48d7b}\"\u{4}"} | ||
| xs 1567907912 1646837549 2298759549 1787615177 # shrinks to ref pairs = [(-28601, 0), (2569, 0), (-3384, 0), (5639, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (-30583, 0), (0, 0), (-154, 0), (-27, 0), (105, 0), (-29, 0), (9, 0), (9, 0), (-508, 0), (-478, 0), (-4095, 0), (-2017, 0), (-130, 0), (27145, 0), (2345, 0), (3241, 0), (458, 0), (-6211, 0), (361, 0), (-4772, 0), (-7717, 0), (4265, 0), (-1144, 0)] | ||
| xs 2574157460 1821361166 2171243272 102290569 # shrinks to ref pairs = [(0, 0), (7, 0), (7, 0), (2055, 0), (0, 0), (-9530, 0), (0, 0), (6, 0), (6, 0), (0, 0), (6, 0), (0, 0), (0, 0), (0, 0), (0, 0), (-11133, 0), (-161, 0), (-2, 0), (-2051, 0), (-3111, 0), (-2092, 0), (0, 0), (24131, 0), (-5278, 0), (6, 0), (70, 0), (0, 0), (6, 0), (6, 0), (-31, 0), (-3492, 0), (-2373, 0), (8902, 0), (-2438, 0), (3014, 0), (7206, 0), (6854, 0), (15161, 0), (-699, 0)] |
| # Seeds for failure cases proptest has generated in the past. It is | ||
| # automatically read and these particular cases re-run before any | ||
| # novel cases are generated. | ||
| # | ||
| # It is recommended to check this file in to source control so that | ||
| # everyone who runs the test benefits from these saved cases. | ||
| xs 4213962225 2884706512 1606470227 2259275645 # shrinks to ref s = {"\\\u{4}\u{b}\u{c7afb}Q$x/\u{1a4f0}\u{1}\u{399ac}$.\u{0}=J>\"\u{2}=\t\t*q乣\'?6\u{ca350}\u{a20b5}", "\u{b50f2}$", "\u{de54f}/¥\u{1b}{*\"¥*:\\\u{e77d2}*s`?\u{3}/\u{9daa7}\t\u{1b}\":\'\u{7cf05}G🕴j", "\u{a2848}\u{bf244}.$=d\u{51d0f}¥\u{98d35}\u{3457c}<`𖡒{\"k�\t.$u\u{0}.", "!`", "\u{4}\u{9c2d9}r\u{d33a9}¥쇛\u{cd875}\u{7f}\\\u{37b37}`\u{b}\ruR\r\t\u{8aaa0}\\&`\u{b}\u{feff}\u{b868c}\u{a976e}\u{0}\\X\u{514dd}&k", "\u{feff}🕴M", "\u{b162a}S\u{6}\"\r\u{4b435}🕴 \\\u{b16df}\'\u{3468e}\\", "÷/\\\u{4dfaf}\u{7f}*\u{47f16}\"�aZ\r(Tj\u{1b}记\t;¥*<\u{1b}E\u{8d037}"} |
Sorry, the diff of this file is not supported yet
| # Seeds for failure cases proptest has generated in the past. It is | ||
| # automatically read and these particular cases re-run before any | ||
| # novel cases are generated. | ||
| # | ||
| # It is recommended to check this file in to source control so that | ||
| # everyone who runs the test benefits from these saved cases. | ||
| xs 888006417 2608449019 3789353629 478040202 # shrinks to ref m = {0: 0} |
| # Seeds for failure cases proptest has generated in the past. It is | ||
| # automatically read and these particular cases re-run before any | ||
| # novel cases are generated. | ||
| # | ||
| # It is recommended to check this file in to source control so that | ||
| # everyone who runs the test benefits from these saved cases. | ||
| xs 3983395997 40281418 114824171 2339847213 # shrinks to ref v = {1285771567, -841112960, -2090277076, 1080385872, 900828884, 615148720, -333870035, -1551786909, -1167746969, -1453736382, -1747821313, 367596715, 1982056530, -1495713558} | ||
| xs 2832291072 3367532499 2480853836 1445020057 # shrinks to ref v = {-1006265241: 1190299023, -874470135: -656918271, -747552887: -119701798, -446035143: 289470610, -38617499: -70412299, -28555422: 742423513, 549345238: -1218765301, 1006459863: 373426025, 1730586809: 1217890615, 1741069766: 1330906833} | ||
| xs 497222929 1550339526 1868828736 2852494662 # shrinks to ref v = {-33, -32, -31, -30, -29, -28, -27, -26, -25, -24, -23, -22, -21, -20, -19, -18, -17, -16, -15, -14, -13, -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, 0} | ||
| xs 3367619631 4093181880 814513877 3641392342 # shrinks to ref v = {-33: 0, -32: 0, -31: 0, -30: 0, -29: 0, -28: 0, -27: 0, -26: 0, -25: 0, -24: 0, -23: 0, -22: 0, -21: 0, -20: 0, -19: 0, -18: 0, -17: 0, -16: 0, -15: 0, -14: 0, -13: 0, -12: 0, -11: 0, -10: 0, -9: 0, -8: 0, -7: 0, -6: 0, -5: 0, -4: 0, -3: 0, -2: 0, 0: 0} |
| # Seeds for failure cases proptest has generated in the past. It is | ||
| # automatically read and these particular cases re-run before any | ||
| # novel cases are generated. | ||
| # | ||
| # It is recommended to check this file in to source control so that | ||
| # everyone who runs the test benefits from these saved cases. | ||
| xs 1397459766 1987461941 1386942626 306293423 # shrinks to ref input = [0, 777418683, 1143505337, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1143505337, 0, -275943289, -1, 0, 0, 0, 777418684, 0, 777418684] |
| # Seeds for failure cases proptest has generated in the past. It is | ||
| # automatically read and these particular cases re-run before any | ||
| # novel cases are generated. | ||
| # | ||
| # It is recommended to check this file in to source control so that | ||
| # everyone who runs the test benefits from these saved cases. | ||
| cc a81c870198d194d869b85a541fca54b5a3f3ea4e84705bfdede6212ad7451789 # shrinks to actions = [PushFront(0), PushFront(0), PushFront(0), PushFront(0), PushFront(0), PushFront(0), SplitLeft(0), PushFront(0), PushFront(0), PushFront(0), Remove(0), PopFront, PushFront(0), PushFront(0), PushFront(0), PushFront(0), PushFront(0), PushFront(0), SplitLeft(1026178654884686841), PushFront(0), PushFront(0), SplitLeft(2673257349917114567), PushFront(0), PushFront(0), PushFront(0), PushFront(0), JoinLeft([0, 0, 0, 0, 0, 0, 0]), PushFront(0), PushFront(0), SplitRight(6380212717721778205), JoinLeft([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), PopFront, Insert(0, 0), PushFront(0), PushFront(0), SplitRight(12236220624414400388), Insert(0, 0), PushFront(0), JoinLeft([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), SplitLeft(13848748256934322935), JoinLeft([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), JoinLeft([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), JoinLeft([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), JoinRight([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), SplitLeft(13115524110820767241), Insert(0, 0), JoinRight([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), PushFront(0), PopFront, PopFront, Remove(0), Insert(0, 0), PopFront, JoinRight([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), PopFront, PushFront(0), PopFront, PushFront(0), PushFront(0), Remove(0), SplitLeft(9383655485369749481), JoinRight([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), PopBack, PushFront(0), Insert(455053961473158936, 0), SplitRight(676041696221001931), PushBack(0), PopFront, JoinRight([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), JoinRight([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), JoinRight([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), PushFront(0), PushFront(0), PushFront(0), JoinLeft([0])] | ||
| cc bae4a6aa243531a345cb36883fda4aebc84848fffe12d051df4e24ff22af3689 # shrinks to actions = let mut vec = Vector::new(); let mut vec_new = Vector::from([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); vec_new.append(vec); vec = vec_new; vec = vec.split_off(6); vec.pop_front(); vec.pop_front(); vec.push_front(0); vec.pop_front(); vec.push_front(0); vec.append(Vector::from([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])); vec.split_off(141); let mut vec_new = Vector::from([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); vec_new.append(vec); vec = vec_new; vec.insert(41, 0); vec.pop_front(); vec.pop_front(); vec = vec.split_off(5); vec.pop_front(); vec.append(Vector::from([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])); vec.append(Vector::from([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1])); vec.push_front(0); vec.push_front(0); let mut vec_new = Vector::from([0]); vec_new.append(vec); vec = vec_new; |
| # Seeds for failure cases proptest has generated in the past. It is | ||
| # automatically read and these particular cases re-run before any | ||
| # novel cases are generated. | ||
| # | ||
| # It is recommended to check this file in to source control so that | ||
| # everyone who runs the test benefits from these saved cases. | ||
| xs 781088174 2402437932 46071810 3445483747 # shrinks to ref vec = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] | ||
| xs 1236163365 497060525 1875560600 3785939576 | ||
| xs 2440477773 3871129562 3025797391 1057174199 # shrinks to ref vec1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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::unit_arg)] | ||
| use std::collections::HashSet as NatSet; | ||
| use std::fmt::{Debug, Error, Formatter, Write}; | ||
| use std::hash::Hash; | ||
| use crate::HashSet; | ||
| use proptest::proptest; | ||
| use proptest_derive::Arbitrary; | ||
| #[derive(Arbitrary, Debug)] | ||
| enum Action<A> { | ||
| Insert(A), | ||
| Remove(A), | ||
| } | ||
| #[derive(Arbitrary)] | ||
| struct Actions<A>(Vec<Action<A>>) | ||
| where | ||
| A: Hash + Eq + Clone; | ||
| impl<A> Debug for Actions<A> | ||
| where | ||
| A: Hash + Eq + Debug + Clone, | ||
| { | ||
| fn fmt(&self, f: &mut Formatter) -> Result<(), Error> { | ||
| let mut out = String::new(); | ||
| let mut expected = NatSet::new(); | ||
| writeln!(out, "let mut set = HashSet::new();")?; | ||
| for action in &self.0 { | ||
| match action { | ||
| Action::Insert(ref value) => { | ||
| expected.insert(value.clone()); | ||
| writeln!(out, "set.insert({:?});", value)?; | ||
| } | ||
| Action::Remove(ref value) => { | ||
| expected.remove(value); | ||
| writeln!(out, "set.remove({:?});", value)?; | ||
| } | ||
| } | ||
| } | ||
| writeln!( | ||
| out, | ||
| "let expected = vec!{:?};", | ||
| expected.into_iter().collect::<Vec<_>>() | ||
| )?; | ||
| writeln!(out, "assert_eq!(HashSet::from(expected), set);")?; | ||
| write!(f, "{}", super::code_fmt(&out)) | ||
| } | ||
| } | ||
| proptest! { | ||
| #[test] | ||
| fn comprehensive(actions: Actions<u8>) { | ||
| let mut set = HashSet::new(); | ||
| let mut nat = NatSet::new(); | ||
| for action in actions.0 { | ||
| match action { | ||
| Action::Insert(value) => { | ||
| let len = nat.len() + if nat.contains(&value) { | ||
| 0 | ||
| } else { | ||
| 1 | ||
| }; | ||
| nat.insert(value); | ||
| set.insert(value); | ||
| assert_eq!(len, set.len()); | ||
| } | ||
| Action::Remove(value) => { | ||
| let len = nat.len() - if nat.contains(&value) { | ||
| 1 | ||
| } else { | ||
| 0 | ||
| }; | ||
| nat.remove(&value); | ||
| set.remove(&value); | ||
| assert_eq!(len, set.len()); | ||
| } | ||
| } | ||
| assert_eq!(nat.len(), set.len()); | ||
| assert_eq!(HashSet::from(nat.clone()), set); | ||
| } | ||
| } | ||
| } |
| mod hashset; | ||
| mod ordset; | ||
| mod vector; | ||
| fn code_fmt(code: &str) -> String { | ||
| use syntect::easy::HighlightLines; | ||
| use syntect::highlighting::{Style, ThemeSet}; | ||
| use syntect::parsing::SyntaxSet; | ||
| use syntect::util::{as_24_bit_terminal_escaped, LinesWithEndings}; | ||
| let ps = SyntaxSet::load_defaults_newlines(); | ||
| let ts = ThemeSet::load_defaults(); | ||
| let syntax = ps.find_syntax_by_extension("rs").unwrap(); | ||
| let mut h = HighlightLines::new(syntax, &ts.themes["base16-ocean.dark"]); | ||
| let mut out = String::from("\n\n"); | ||
| for line in LinesWithEndings::from(&code) { | ||
| let ranges: Vec<(Style, &str)> = h.highlight(line, &ps); | ||
| let escaped = as_24_bit_terminal_escaped(&ranges[..], false); | ||
| out += &escaped; | ||
| } | ||
| out += "\n\x1b[0m"; | ||
| out | ||
| } |
| #![allow(clippy::unit_arg)] | ||
| use std::collections::BTreeSet; | ||
| use std::fmt::{Debug, Error, Formatter, Write}; | ||
| use crate::OrdSet; | ||
| use proptest::proptest; | ||
| use proptest_derive::Arbitrary; | ||
| #[derive(Arbitrary, Debug)] | ||
| enum Action<A> { | ||
| Insert(A), | ||
| Remove(A), | ||
| } | ||
| #[derive(Arbitrary)] | ||
| struct Actions<A>(Vec<Action<A>>) | ||
| where | ||
| A: Ord + Clone; | ||
| impl<A> Debug for Actions<A> | ||
| where | ||
| A: Ord + Debug + Clone, | ||
| { | ||
| fn fmt(&self, f: &mut Formatter) -> Result<(), Error> { | ||
| let mut out = String::new(); | ||
| let mut expected = BTreeSet::new(); | ||
| writeln!(out, "let mut set = OrdSet::new();")?; | ||
| for action in &self.0 { | ||
| match action { | ||
| Action::Insert(ref value) => { | ||
| expected.insert(value.clone()); | ||
| writeln!(out, "set.insert({:?});", value)?; | ||
| } | ||
| Action::Remove(ref value) => { | ||
| expected.remove(value); | ||
| writeln!(out, "set.remove({:?});", value)?; | ||
| } | ||
| } | ||
| } | ||
| writeln!( | ||
| out, | ||
| "let expected = vec!{:?};", | ||
| expected.into_iter().collect::<Vec<_>>() | ||
| )?; | ||
| writeln!(out, "assert_eq!(OrdSet::from(expected), set);")?; | ||
| write!(f, "{}", super::code_fmt(&out)) | ||
| } | ||
| } | ||
| proptest! { | ||
| #[test] | ||
| fn comprehensive(actions: Actions<u8>) { | ||
| let mut set = OrdSet::new(); | ||
| let mut nat = BTreeSet::new(); | ||
| for action in actions.0 { | ||
| match action { | ||
| Action::Insert(value) => { | ||
| let len = nat.len() + if nat.contains(&value) { | ||
| 0 | ||
| } else { | ||
| 1 | ||
| }; | ||
| nat.insert(value); | ||
| set.insert(value); | ||
| assert_eq!(len, set.len()); | ||
| } | ||
| Action::Remove(value) => { | ||
| let len = nat.len() - if nat.contains(&value) { | ||
| 1 | ||
| } else { | ||
| 0 | ||
| }; | ||
| nat.remove(&value); | ||
| set.remove(&value); | ||
| assert_eq!(len, set.len()); | ||
| } | ||
| } | ||
| assert_eq!(nat.len(), set.len()); | ||
| assert_eq!(OrdSet::from(nat.clone()), set); | ||
| assert!(nat.iter().eq(set.iter())); | ||
| } | ||
| } | ||
| } |
| #![allow(clippy::unit_arg)] | ||
| use std::fmt::{Debug, Error, Formatter, Write}; | ||
| use std::iter::FromIterator; | ||
| use crate::Vector; | ||
| use proptest::proptest; | ||
| use proptest_derive::Arbitrary; | ||
| #[derive(Arbitrary, Debug)] | ||
| enum Action<A> { | ||
| PushFront(A), | ||
| PushBack(A), | ||
| PopFront, | ||
| PopBack, | ||
| Insert(usize, A), | ||
| Remove(usize), | ||
| JoinLeft(Vec<A>), | ||
| JoinRight(Vec<A>), | ||
| SplitLeft(usize), | ||
| SplitRight(usize), | ||
| } | ||
| #[derive(Arbitrary)] | ||
| struct Actions<A>(Vec<Action<A>>) | ||
| where | ||
| A: Clone; | ||
| impl<A> Debug for Actions<A> | ||
| where | ||
| A: Debug + Clone, | ||
| { | ||
| fn fmt(&self, f: &mut Formatter) -> Result<(), Error> { | ||
| let mut out = String::new(); | ||
| let mut expected = vec![]; | ||
| writeln!(out, "let mut vec = Vector::new();")?; | ||
| for action in &self.0 { | ||
| match action { | ||
| Action::PushFront(ref value) => { | ||
| expected.insert(0, value.clone()); | ||
| writeln!(out, "vec.push_front({:?});", value)? | ||
| } | ||
| Action::PushBack(ref value) => { | ||
| expected.push(value.clone()); | ||
| writeln!(out, "vec.push_back({:?});", value)? | ||
| } | ||
| Action::PopFront => { | ||
| if !expected.is_empty() { | ||
| expected.remove(0); | ||
| } | ||
| writeln!(out, "vec.pop_front();")? | ||
| } | ||
| Action::PopBack => { | ||
| expected.pop(); | ||
| writeln!(out, "vec.pop_back();")? | ||
| } | ||
| Action::Insert(ref index, ref value) => { | ||
| let index = cap_index(expected.len(), *index); | ||
| expected.insert(index, value.clone()); | ||
| writeln!(out, "vec.insert({:?}, {:?});", index, value)? | ||
| } | ||
| Action::Remove(ref index) => { | ||
| if !expected.is_empty() { | ||
| let index = cap_index(expected.len(), *index); | ||
| expected.remove(index); | ||
| writeln!(out, "vec.remove({:?})", index)? | ||
| } else { | ||
| continue; | ||
| } | ||
| } | ||
| Action::JoinLeft(ref vec) => { | ||
| let mut vec_new = vec.clone(); | ||
| vec_new.append(&mut expected); | ||
| expected = vec_new; | ||
| writeln!( | ||
| out, | ||
| "let mut vec_new = Vector::from(vec!{:?}); // size {:?}", | ||
| vec, | ||
| vec.len() | ||
| )?; | ||
| writeln!(out, "vec_new.append(vec);")?; | ||
| writeln!(out, "vec = vec_new;")? | ||
| } | ||
| Action::JoinRight(ref vec) => { | ||
| expected.append(&mut vec.clone()); | ||
| writeln!( | ||
| out, | ||
| "vec.append(Vector::from(vec!{:?})); // size {:?}", | ||
| vec, | ||
| vec.len() | ||
| )? | ||
| } | ||
| Action::SplitLeft(ref index) => { | ||
| let index = cap_index(expected.len(), *index); | ||
| expected.split_off(index); | ||
| writeln!(out, "vec.split_off({:?});", index)? | ||
| } | ||
| Action::SplitRight(ref index) => { | ||
| let index = cap_index(expected.len(), *index); | ||
| expected = expected.split_off(index); | ||
| writeln!(out, "vec = vec.split_off({:?});", index)? | ||
| } | ||
| } | ||
| writeln!(out, "// len = {:?}", expected.len())?; | ||
| } | ||
| writeln!(out, "let expected = vec!{:?};", expected)?; | ||
| writeln!(out, "assert_eq!(Vector::from(expected), vec);")?; | ||
| write!(f, "{}", super::code_fmt(&out)) | ||
| } | ||
| } | ||
| fn cap_index(len: usize, index: usize) -> usize { | ||
| if len == 0 { | ||
| 0 | ||
| } else { | ||
| index % len | ||
| } | ||
| } | ||
| proptest! { | ||
| #[test] | ||
| fn comprehensive(actions: Actions<u8>) { | ||
| let mut vec = Vector::new(); | ||
| let mut nat = Vec::new(); | ||
| vec.assert_invariants(); | ||
| for action in actions.0 { | ||
| match action { | ||
| Action::PushFront(value) => { | ||
| let len = vec.len(); | ||
| nat.insert(0, value); | ||
| vec.push_front(value); | ||
| assert_eq!(len + 1, vec.len()); | ||
| } | ||
| Action::PushBack(value) => { | ||
| let len = vec.len(); | ||
| nat.push(value); | ||
| vec.push_back(value); | ||
| assert_eq!(len + 1, vec.len()); | ||
| } | ||
| Action::PopFront => { | ||
| if vec.is_empty() { | ||
| assert_eq!(None, vec.pop_front()); | ||
| } else { | ||
| let len = vec.len(); | ||
| assert_eq!(nat.remove(0), vec.pop_front().unwrap()); | ||
| assert_eq!(len - 1, vec.len()); | ||
| } | ||
| } | ||
| Action::PopBack => { | ||
| if vec.is_empty() { | ||
| assert_eq!(None, vec.pop_back()); | ||
| } else { | ||
| let len = vec.len(); | ||
| assert_eq!(nat.pop(), vec.pop_back()); | ||
| assert_eq!(len - 1, vec.len()); | ||
| } | ||
| } | ||
| Action::Insert(index, value) => { | ||
| let index = cap_index(vec.len(), index); | ||
| let len = vec.len(); | ||
| nat.insert(index, value); | ||
| vec.insert(index, value); | ||
| assert_eq!(len + 1, vec.len()); | ||
| } | ||
| Action::Remove(index) => { | ||
| if vec.is_empty() { | ||
| continue; | ||
| } | ||
| let index = cap_index(vec.len(), index); | ||
| let len = vec.len(); | ||
| assert_eq!(nat.remove(index), vec.remove(index)); | ||
| assert_eq!(len - 1, vec.len()); | ||
| } | ||
| Action::JoinLeft(mut new_nat) => { | ||
| let mut new_vec = Vector::from_iter(new_nat.iter().cloned()); | ||
| let add_len = new_nat.len(); | ||
| let len = vec.len(); | ||
| new_vec.append(vec); | ||
| vec = new_vec; | ||
| new_nat.append(&mut nat); | ||
| nat = new_nat; | ||
| assert_eq!(len + add_len, vec.len()); | ||
| } | ||
| Action::JoinRight(mut new_nat) => { | ||
| let new_vec = Vector::from_iter(new_nat.iter().cloned()); | ||
| let add_len = new_nat.len(); | ||
| let len = vec.len(); | ||
| vec.append(new_vec); | ||
| nat.append(&mut new_nat); | ||
| assert_eq!(len + add_len, vec.len()); | ||
| } | ||
| Action::SplitLeft(index) => { | ||
| let index = cap_index(vec.len(), index); | ||
| let len = vec.len(); | ||
| let vec_right = vec.split_off(index); | ||
| let nat_right = nat.split_off(index); | ||
| assert_eq!(index, vec.len()); | ||
| assert_eq!(len - index, vec_right.len()); | ||
| assert_eq!(Vector::from_iter(nat_right.iter().cloned()), vec_right); | ||
| } | ||
| Action::SplitRight(index) => { | ||
| let index = cap_index(vec.len(), index); | ||
| let len = vec.len(); | ||
| let vec_right = vec.split_off(index); | ||
| let nat_right = nat.split_off(index); | ||
| assert_eq!(index, vec.len()); | ||
| assert_eq!(len - index, vec_right.len()); | ||
| assert_eq!(Vector::from_iter(nat.iter().cloned()), vec); | ||
| vec = vec_right; | ||
| nat = nat_right; | ||
| } | ||
| } | ||
| vec.assert_invariants(); | ||
| assert_eq!(nat.len(),vec.len()); | ||
| assert_eq!(Vector::from_iter(nat.iter().cloned()), vec); | ||
| } | ||
| } | ||
| } |
+7
-1
@@ -16,3 +16,3 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO | ||
| name = "im-rc" | ||
| version = "12.3.2" | ||
| version = "12.3.3" | ||
| authors = ["Bodil Stokke <bodil@bodil.org>"] | ||
@@ -61,2 +61,5 @@ build = "./build.rs" | ||
| [dev-dependencies.proptest-derive] | ||
| version = "0.1.0" | ||
| [dev-dependencies.rand] | ||
@@ -73,2 +76,5 @@ version = "0.6" | ||
| version = "1.0" | ||
| [dev-dependencies.syntect] | ||
| version = "3.1.0" | ||
| [build-dependencies.rustc_version] | ||
@@ -75,0 +81,0 @@ version = "0.2" |
+10
-0
@@ -9,2 +9,12 @@ # Changelog | ||
| ## [12.3.3] - 2019-03-11 | ||
| ### Fixed | ||
| - A number of issues were fixed where `Vector`'s size table would get out of | ||
| sync with the node structure if exercised too much and cause erroneous | ||
| behaviour. (#72, #74) | ||
| - Comprehensive generative tests were added to test all data structures through | ||
| more unexpected code paths. | ||
| ## [12.3.2] - 2019-03-05 | ||
@@ -11,0 +21,0 @@ |
+3
-0
@@ -380,2 +380,5 @@ // This Source Code Form is subject to the terms of the Mozilla Public | ||
| #[cfg(test)] | ||
| mod tests; | ||
| /// Update a value inside multiple levels of data structures. | ||
@@ -382,0 +385,0 @@ /// |
+68
-9
@@ -94,3 +94,4 @@ // This Source Code Form is subject to the terms of the Mozilla Public | ||
| Left => { | ||
| debug_assert_eq!(value, size_table.pop_front()); | ||
| let first = size_table.pop_front(); | ||
| debug_assert_eq!(value, first); | ||
| for entry in size_table.iter_mut() { | ||
@@ -124,3 +125,3 @@ *entry -= value; | ||
| pub enum PushResult<A> { | ||
| Full(A), | ||
| Full(A, usize), | ||
| Done, | ||
@@ -439,3 +440,3 @@ } | ||
| if let Entry::Nodes(Size::Table(ref size_table), _) = self.children { | ||
| if size_table[target_idx] <= index { | ||
| while size_table[target_idx] <= index { | ||
| target_idx += 1; | ||
@@ -557,3 +558,3 @@ if target_idx >= size_table.len() { | ||
| } else { | ||
| PushResult::Full(chunk) | ||
| PushResult::Full(chunk, 0) | ||
| } | ||
@@ -564,3 +565,3 @@ } | ||
| // possible over from the new node. | ||
| match side { | ||
| let num_drained = match side { | ||
| Side::Right => { | ||
@@ -576,2 +577,5 @@ if let Entry::Nodes(ref mut size, ref mut children) = self.children { | ||
| size.push(Side::Right, values.len()); | ||
| to_drain | ||
| } else { | ||
| 0 | ||
| } | ||
@@ -589,7 +593,10 @@ } | ||
| size.push(Side::Left, values.len()); | ||
| to_drain | ||
| } else { | ||
| 0 | ||
| } | ||
| } | ||
| } | ||
| }; | ||
| if is_full { | ||
| PushResult::Full(chunk) | ||
| PushResult::Full(chunk, num_drained) | ||
| } else { | ||
@@ -616,5 +623,24 @@ // If the chunk is empty after being drained, there might be | ||
| PushResult::Done => None, | ||
| PushResult::Full(chunk) => { | ||
| PushResult::Full(chunk, num_drained) => { | ||
| // Our chunk was too large for `child`, so it could not | ||
| // be pushed there. However, exactly `num_drained` | ||
| // elements were added to the child. We need to reflect | ||
| // that change in the size field of the node. | ||
| match side { | ||
| Right => match self.children { | ||
| Entry::Nodes(Size::Table(ref mut sizes), _) => { | ||
| let sizes = Ref::make_mut(sizes); | ||
| sizes[index] += num_drained; | ||
| } | ||
| Entry::Nodes(Size::Size(ref mut size), _) => { | ||
| *size += num_drained; | ||
| } | ||
| Entry::Values(_) | Entry::Empty => (), | ||
| }, | ||
| Left => { | ||
| self.update_size(0, num_drained as isize); | ||
| } | ||
| } | ||
| if is_full { | ||
| return PushResult::Full(chunk); | ||
| return PushResult::Full(chunk, 0); | ||
| } else { | ||
@@ -937,2 +963,35 @@ Some(Node::from_chunk(level - 1, chunk)) | ||
| pub fn assert_invariants(&self) -> usize { | ||
| // Verifies that the size table matches reality. | ||
| match self.children { | ||
| Entry::Empty => 0, | ||
| Entry::Values(ref values) => { | ||
| // An empty value node is pointless and should never occur. | ||
| assert_ne!(0, values.len()); | ||
| values.len() | ||
| } | ||
| Entry::Nodes(ref size, ref children) => { | ||
| // A parent node with no children should never occur. | ||
| assert_ne!(0, children.len()); | ||
| let mut lengths = Vec::new(); | ||
| for child in &**children { | ||
| lengths.push(child.assert_invariants()); | ||
| } | ||
| match size { | ||
| Size::Size(size) => { | ||
| let total: usize = lengths.iter().sum(); | ||
| assert_eq!(*size, total); | ||
| } | ||
| Size::Table(ref table) => { | ||
| for (index, current) in table.iter().enumerate() { | ||
| let expected: usize = lengths.iter().take(index + 1).sum(); | ||
| assert_eq!(expected, *current); | ||
| } | ||
| } | ||
| } | ||
| lengths.iter().sum() | ||
| } | ||
| } | ||
| } | ||
| // pub fn print<W>(&self, f: &mut W, indent: usize, level: usize) -> Result<(), fmt::Error> | ||
@@ -939,0 +998,0 @@ // where |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display