MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_particular

Method test_particular

Lib/test/test_strtod.py:288–436  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

286
287 @unittest.expectedFailure # TODO: RUSTPYTHON
288 def test_particular(self):
289 # inputs that produced crashes or incorrectly rounded results with
290 # previous versions of dtoa.c, for various reasons
291 test_strings = [
292 # issue 7632 bug 1, originally reported failing case
293 '2183167012312112312312.23538020374420446192e-370',
294 # 5 instances of issue 7632 bug 2
295 '12579816049008305546974391768996369464963024663104e-357',
296 '17489628565202117263145367596028389348922981857013e-357',
297 '18487398785991994634182916638542680759613590482273e-357',
298 '32002864200581033134358724675198044527469366773928e-358',
299 '94393431193180696942841837085033647913224148539854e-358',
300 '73608278998966969345824653500136787876436005957953e-358',
301 '64774478836417299491718435234611299336288082136054e-358',
302 '13704940134126574534878641876947980878824688451169e-357',
303 '46697445774047060960624497964425416610480524760471e-358',
304 # failing case for bug introduced by METD in r77451 (attempted
305 # fix for issue 7632, bug 2), and fixed in r77482.
306 '28639097178261763178489759107321392745108491825303e-311',
307 # two numbers demonstrating a flaw in the bigcomp 'dig == 0'
308 # correction block (issue 7632, bug 3)
309 '1.00000000000000001e44',
310 '1.0000000000000000100000000000000000000001e44',
311 # dtoa.c bug for numbers just smaller than a power of 2 (issue
312 # 7632, bug 4)
313 '99999999999999994487665465554760717039532578546e-47',
314 # failing case for off-by-one error introduced by METD in
315 # r77483 (dtoa.c cleanup), fixed in r77490
316 '965437176333654931799035513671997118345570045914469' #...
317 '6213413350821416312194420007991306908470147322020121018368e0',
318 # incorrect lsb detection for round-half-to-even when
319 # bc->scale != 0 (issue 7632, bug 6).
320 '104308485241983990666713401708072175773165034278685' #...
321 '682646111762292409330928739751702404658197872319129' #...
322 '036519947435319418387839758990478549477777586673075' #...
323 '945844895981012024387992135617064532141489278815239' #...
324 '849108105951619997829153633535314849999674266169258' #...
325 '928940692239684771590065027025835804863585454872499' #...
326 '320500023126142553932654370362024104462255244034053' #...
327 '203998964360882487378334860197725139151265590832887' #...
328 '433736189468858614521708567646743455601905935595381' #...
329 '852723723645799866672558576993978025033590728687206' #...
330 '296379801363024094048327273913079612469982585674824' #...
331 '156000783167963081616214710691759864332339239688734' #...
332 '656548790656486646106983450809073750535624894296242' #...
333 '072010195710276073042036425579852459556183541199012' #...
334 '652571123898996574563824424330960027873516082763671875e-1075',
335 # demonstration that original fix for issue 7632 bug 1 was
336 # buggy; the exit condition was too strong
337 '247032822920623295e-341',
338 # demonstrate similar problem to issue 7632 bug1: crash
339 # with 'oversized quotient in quorem' message.
340 '99037485700245683102805043437346965248029601286431e-373',
341 '99617639833743863161109961162881027406769510558457e-373',
342 '98852915025769345295749278351563179840130565591462e-372',
343 '99059944827693569659153042769690930905148015876788e-373',
344 '98914979205069368270421829889078356254059760327101e-372',
345 # issue 7632 bug 5: the following 2 strings convert differently

Callers

nothing calls this directly

Calls 1

check_strtodMethod · 0.95

Tested by

no test coverage detected