python-3.6.zip added from Github

README.cosmo contains the necessary links.
This commit is contained in:
ahgamut 2021-08-08 09:38:33 +05:30 committed by Justine Tunney
parent 75fc601ff5
commit 0c4c56ff39
4219 changed files with 1968626 additions and 0 deletions

Binary file not shown.

View file

@ -0,0 +1 @@
# Dummy file to make this directory a package.

View file

@ -0,0 +1,2 @@
from test.libregrtest import main
main()

File diff suppressed because it is too large Load diff

81
third_party/python/Lib/test/allsans.pem vendored Normal file
View file

@ -0,0 +1,81 @@
-----BEGIN PRIVATE KEY-----
MIIG/QIBADANBgkqhkiG9w0BAQEFAASCBucwggbjAgEAAoIBgQCg/pM6dP7BTFNc
qe6wIJIBB7HjwL42bp0vjcCVl4Z3MRWFswYpfxy+o+8+PguMp4K6zndA5fwNkK/H
3HmtanncUfPqnV0usN0NHQGh/f9xRoNmB1q2L7kTuO99o0KLQgvonRT2snf8rq9n
tPRzhHUGYhog7zzNxetYV309PHpPr19BcKepDtM5RMk2aBnoN5vtItorjXiDosFm
6o5wQHrcupcVydszba6P75BEbc1XIWvq2Fv8muaw4pCe81QYINyLqgcPNO/nF3Os
5EI4HKjCNRSCOhOcWqYctXLXN9lBdMBBvQc3zDmYzh1eIZewzZXPVEQT33xPkhxz
HNmhcIctpWX4LTRF6FulkcbeuZDga3gkZYJf/M6IpU1WYXr6q8sNxbgmRRX/NuHo
V9oDwBzLG07rKUiqRHfjGqoCRmmVeVYpryvXUNjHGH0nlVzz/8lTUxAnJorO3Fdc
I+6zKLUPICdAlvz51AH6yopgPFhrdgA0pVzPO6L5G8SRQCxKhAUCAwEAAQKCAYAa
2jtOTcNMFGH3G7TfFZ+kolbuaPCQ/aQkEV2k1dAswzgWw8RsWXI+7fLyi8C7Zhks
9VD4tyNyU8at7D0zSoYm1Fh9sl+fcQp9rG/gSBA6IYu7EdD0gEM7YeY4K2nm9k4s
Lz8W4q+WqsBA6PK47cfjF6vKAH1AyRk28+jEtPiln9egf5zHWtyqOanh9D0V+Wh9
hgmjqAYI1rWxZ7/4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5NH0S40CChYaRfMF0xCzAJBgNVBAYTAlhZMRcwFQYD
VQQHDA5DYXN0bGUgQW50aHJheDEjMCEGA1UECgwaUHl0aG9uIFNvZnR3YXJlIEZv
dW5kYXRpb24xEDAOBgNVBAMMB2FsbHNhbnOCCQC1VQOr/cyUuTCBgwYIKwYBBQUH
AQEEdzB1MDwGCCsGAQUFBzAChjBodHRwOi8vdGVzdGNhLnB5dGhvbnRlc3QubmV0
L3Rlc3RjYS9weWNhY2VydC5jZXIwNQYIKwYBBQUHMAGGKWh0dHA6Ly90ZXN0Y2Eu
cHl0aG9udGVzdC5uZXQvdGVzdGNhL29jc3AvMEMGA1UdHwQ8MDowOKA2oDSGMmh0
dHA6Ly90ZXN0Y2EucHl0aG9udGVzdC5uZXQvdGVzdGNhL3Jldm9jYXRpb24uY3Js
MA0GCSqGSIb3DQEBCwUAA4IBgQAeKJKycO2DES98gyR2e/GzPYEw87cCS0cEpiiP
3CEUgzfEbF0X89GDKEey4H3Irvosbvt2hEcf2RNpahLUL/fUv53bDmHNmL8qJg5E
UJVMOHvOpSOjqoqeRuSyG0GnnAuUwcxdrZY6UzLdslhuq9F8UjgHr6KSMx56G9uK
LmTy5njMab0in2xL/YRX/0nogK3BHqpUHrfCdEYZkciRxtAa+OPpWn4dcZi+Fpf7
ZYSgPLNt+djtFDMIAk5Bo+XDaQdW3dhF0w44enrGAOV0xPE+/jOuenNhKBafjuNb
lkeSr45+QZsi1rd18ny8z3uuaGqIAziFgmllZOH2D8giTn6+5jZcCNZCoGKUkPI9
l/GMWwxg4HQYYlZcsZzTCem9Rb2XcrasAbmhFapMtR+QAwSed5vKE7ZdtQhj74kB
7Q0E7Lkgpp6BaObb2As8/f0K/UlSVSvrYk+i3JT9wK/qqkRGxsTFEF7N9t0rKu8y
4JdQDtZCI552MsFvYW6m+IOYgxg=
-----END CERTIFICATE-----

View file

@ -0,0 +1,53 @@
"""
The module for testing variable annotations.
Empty lines above are for good reason (testing for correct line numbers)
"""
from typing import Optional
__annotations__[1] = 2
class C:
x = 5; y: Optional['C'] = None
from typing import Tuple
x: int = 5; y: str = x; f: Tuple[int, int]
class M(type):
__annotations__['123'] = 123
o: type = object
(pars): bool = True
class D(C):
j: str = 'hi'; k: str= 'bye'
from types import new_class
h_class = new_class('H', (C,))
j_class = new_class('J')
class F():
z: int = 5
def __init__(self, x):
pass
class Y(F):
def __init__(self):
super(F, self).__init__(123)
class Meta(type):
def __new__(meta, name, bases, namespace):
return super().__new__(meta, name, bases, namespace)
class S(metaclass = Meta):
x: str = 'something'
y: str = 'something else'
def foo(x: int = 10):
def bar(y: List[str]):
x: str = 'yes'
bar()

View file

@ -0,0 +1,36 @@
"""
Some correct syntax for variable annotation here.
More examples are in test_grammar and test_parser.
"""
from typing import no_type_check, ClassVar
i: int = 1
j: int
x: float = i/10
def f():
class C: ...
return C()
f().new_attr: object = object()
class C:
def __init__(self, x: int) -> None:
self.x = x
c = C(5)
c.new_attr: int = 10
__annotations__ = {}
@no_type_check
class NTC:
def meth(self, param: complex) -> None:
...
class CV:
var: ClassVar['CV']
CV.var = CV()

View file

@ -0,0 +1,18 @@
"""
Correct syntax for variable annotation that should fail at runtime
in a certain manner. More examples are in test_grammar and test_parser.
"""
def f_bad_ann():
__annotations__[1] = 2
class C_OK:
def __init__(self, x: int) -> None:
self.x: no_such_name = x # This one is OK as proposed by Guido
class D_bad_ann:
def __init__(self, x: int) -> None:
sfel.y: int = 0
def g_bad_ann():
no_such_name.attr: int = 0

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
third_party/python/Lib/test/audiotest.au vendored Normal file

Binary file not shown.

View file

@ -0,0 +1,329 @@
from test.support import findfile, TESTFN, unlink
import array
import io
import pickle
class UnseekableIO(io.FileIO):
def tell(self):
raise io.UnsupportedOperation
def seek(self, *args, **kwargs):
raise io.UnsupportedOperation
class AudioTests:
close_fd = False
def setUp(self):
self.f = self.fout = None
def tearDown(self):
if self.f is not None:
self.f.close()
if self.fout is not None:
self.fout.close()
unlink(TESTFN)
def check_params(self, f, nchannels, sampwidth, framerate, nframes,
comptype, compname):
self.assertEqual(f.getnchannels(), nchannels)
self.assertEqual(f.getsampwidth(), sampwidth)
self.assertEqual(f.getframerate(), framerate)
self.assertEqual(f.getnframes(), nframes)
self.assertEqual(f.getcomptype(), comptype)
self.assertEqual(f.getcompname(), compname)
params = f.getparams()
self.assertEqual(params,
(nchannels, sampwidth, framerate, nframes, comptype, compname))
self.assertEqual(params.nchannels, nchannels)
self.assertEqual(params.sampwidth, sampwidth)
self.assertEqual(params.framerate, framerate)
self.assertEqual(params.nframes, nframes)
self.assertEqual(params.comptype, comptype)
self.assertEqual(params.compname, compname)
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
dump = pickle.dumps(params, proto)
self.assertEqual(pickle.loads(dump), params)
class AudioWriteTests(AudioTests):
def create_file(self, testfile):
f = self.fout = self.module.open(testfile, 'wb')
f.setnchannels(self.nchannels)
f.setsampwidth(self.sampwidth)
f.setframerate(self.framerate)
f.setcomptype(self.comptype, self.compname)
return f
def check_file(self, testfile, nframes, frames):
with self.module.open(testfile, 'rb') as f:
self.assertEqual(f.getnchannels(), self.nchannels)
self.assertEqual(f.getsampwidth(), self.sampwidth)
self.assertEqual(f.getframerate(), self.framerate)
self.assertEqual(f.getnframes(), nframes)
self.assertEqual(f.readframes(nframes), frames)
def test_write_params(self):
f = self.create_file(TESTFN)
f.setnframes(self.nframes)
f.writeframes(self.frames)
self.check_params(f, self.nchannels, self.sampwidth, self.framerate,
self.nframes, self.comptype, self.compname)
f.close()
def test_write_context_manager_calls_close(self):
# Close checks for a minimum header and will raise an error
# if it is not set, so this proves that close is called.
with self.assertRaises(self.module.Error):
with self.module.open(TESTFN, 'wb'):
pass
with self.assertRaises(self.module.Error):
with open(TESTFN, 'wb') as testfile:
with self.module.open(testfile):
pass
def test_context_manager_with_open_file(self):
with open(TESTFN, 'wb') as testfile:
with self.module.open(testfile) as f:
f.setnchannels(self.nchannels)
f.setsampwidth(self.sampwidth)
f.setframerate(self.framerate)
f.setcomptype(self.comptype, self.compname)
self.assertEqual(testfile.closed, self.close_fd)
with open(TESTFN, 'rb') as testfile:
with self.module.open(testfile) as f:
self.assertFalse(f.getfp().closed)
params = f.getparams()
self.assertEqual(params.nchannels, self.nchannels)
self.assertEqual(params.sampwidth, self.sampwidth)
self.assertEqual(params.framerate, self.framerate)
if not self.close_fd:
self.assertIsNone(f.getfp())
self.assertEqual(testfile.closed, self.close_fd)
def test_context_manager_with_filename(self):
# If the file doesn't get closed, this test won't fail, but it will
# produce a resource leak warning.
with self.module.open(TESTFN, 'wb') as f:
f.setnchannels(self.nchannels)
f.setsampwidth(self.sampwidth)
f.setframerate(self.framerate)
f.setcomptype(self.comptype, self.compname)
with self.module.open(TESTFN) as f:
self.assertFalse(f.getfp().closed)
params = f.getparams()
self.assertEqual(params.nchannels, self.nchannels)
self.assertEqual(params.sampwidth, self.sampwidth)
self.assertEqual(params.framerate, self.framerate)
if not self.close_fd:
self.assertIsNone(f.getfp())
def test_write(self):
f = self.create_file(TESTFN)
f.setnframes(self.nframes)
f.writeframes(self.frames)
f.close()
self.check_file(TESTFN, self.nframes, self.frames)
def test_write_bytearray(self):
f = self.create_file(TESTFN)
f.setnframes(self.nframes)
f.writeframes(bytearray(self.frames))
f.close()
self.check_file(TESTFN, self.nframes, self.frames)
def test_write_array(self):
f = self.create_file(TESTFN)
f.setnframes(self.nframes)
f.writeframes(array.array('h', self.frames))
f.close()
self.check_file(TESTFN, self.nframes, self.frames)
def test_write_memoryview(self):
f = self.create_file(TESTFN)
f.setnframes(self.nframes)
f.writeframes(memoryview(self.frames))
f.close()
self.check_file(TESTFN, self.nframes, self.frames)
def test_incompleted_write(self):
with open(TESTFN, 'wb') as testfile:
testfile.write(b'ababagalamaga')
f = self.create_file(testfile)
f.setnframes(self.nframes + 1)
f.writeframes(self.frames)
f.close()
with open(TESTFN, 'rb') as testfile:
self.assertEqual(testfile.read(13), b'ababagalamaga')
self.check_file(testfile, self.nframes, self.frames)
def test_multiple_writes(self):
with open(TESTFN, 'wb') as testfile:
testfile.write(b'ababagalamaga')
f = self.create_file(testfile)
f.setnframes(self.nframes)
framesize = self.nchannels * self.sampwidth
f.writeframes(self.frames[:-framesize])
f.writeframes(self.frames[-framesize:])
f.close()
with open(TESTFN, 'rb') as testfile:
self.assertEqual(testfile.read(13), b'ababagalamaga')
self.check_file(testfile, self.nframes, self.frames)
def test_overflowed_write(self):
with open(TESTFN, 'wb') as testfile:
testfile.write(b'ababagalamaga')
f = self.create_file(testfile)
f.setnframes(self.nframes - 1)
f.writeframes(self.frames)
f.close()
with open(TESTFN, 'rb') as testfile:
self.assertEqual(testfile.read(13), b'ababagalamaga')
self.check_file(testfile, self.nframes, self.frames)
def test_unseekable_read(self):
with self.create_file(TESTFN) as f:
f.setnframes(self.nframes)
f.writeframes(self.frames)
with UnseekableIO(TESTFN, 'rb') as testfile:
self.check_file(testfile, self.nframes, self.frames)
def test_unseekable_write(self):
with UnseekableIO(TESTFN, 'wb') as testfile:
with self.create_file(testfile) as f:
f.setnframes(self.nframes)
f.writeframes(self.frames)
self.check_file(TESTFN, self.nframes, self.frames)
def test_unseekable_incompleted_write(self):
with UnseekableIO(TESTFN, 'wb') as testfile:
testfile.write(b'ababagalamaga')
f = self.create_file(testfile)
f.setnframes(self.nframes + 1)
try:
f.writeframes(self.frames)
except OSError:
pass
try:
f.close()
except OSError:
pass
with open(TESTFN, 'rb') as testfile:
self.assertEqual(testfile.read(13), b'ababagalamaga')
self.check_file(testfile, self.nframes + 1, self.frames)
def test_unseekable_overflowed_write(self):
with UnseekableIO(TESTFN, 'wb') as testfile:
testfile.write(b'ababagalamaga')
f = self.create_file(testfile)
f.setnframes(self.nframes - 1)
try:
f.writeframes(self.frames)
except OSError:
pass
try:
f.close()
except OSError:
pass
with open(TESTFN, 'rb') as testfile:
self.assertEqual(testfile.read(13), b'ababagalamaga')
framesize = self.nchannels * self.sampwidth
self.check_file(testfile, self.nframes - 1, self.frames[:-framesize])
class AudioTestsWithSourceFile(AudioTests):
@classmethod
def setUpClass(cls):
cls.sndfilepath = findfile(cls.sndfilename, subdir='audiodata')
def test_read_params(self):
f = self.f = self.module.open(self.sndfilepath)
#self.assertEqual(f.getfp().name, self.sndfilepath)
self.check_params(f, self.nchannels, self.sampwidth, self.framerate,
self.sndfilenframes, self.comptype, self.compname)
def test_close(self):
with open(self.sndfilepath, 'rb') as testfile:
f = self.f = self.module.open(testfile)
self.assertFalse(testfile.closed)
f.close()
self.assertEqual(testfile.closed, self.close_fd)
with open(TESTFN, 'wb') as testfile:
fout = self.fout = self.module.open(testfile, 'wb')
self.assertFalse(testfile.closed)
with self.assertRaises(self.module.Error):
fout.close()
self.assertEqual(testfile.closed, self.close_fd)
fout.close() # do nothing
def test_read(self):
framesize = self.nchannels * self.sampwidth
chunk1 = self.frames[:2 * framesize]
chunk2 = self.frames[2 * framesize: 4 * framesize]
f = self.f = self.module.open(self.sndfilepath)
self.assertEqual(f.readframes(0), b'')
self.assertEqual(f.tell(), 0)
self.assertEqual(f.readframes(2), chunk1)
f.rewind()
pos0 = f.tell()
self.assertEqual(pos0, 0)
self.assertEqual(f.readframes(2), chunk1)
pos2 = f.tell()
self.assertEqual(pos2, 2)
self.assertEqual(f.readframes(2), chunk2)
f.setpos(pos2)
self.assertEqual(f.readframes(2), chunk2)
f.setpos(pos0)
self.assertEqual(f.readframes(2), chunk1)
with self.assertRaises(self.module.Error):
f.setpos(-1)
with self.assertRaises(self.module.Error):
f.setpos(f.getnframes() + 1)
def test_copy(self):
f = self.f = self.module.open(self.sndfilepath)
fout = self.fout = self.module.open(TESTFN, 'wb')
fout.setparams(f.getparams())
i = 0
n = f.getnframes()
while n > 0:
i += 1
fout.writeframes(f.readframes(i))
n -= i
fout.close()
fout = self.fout = self.module.open(TESTFN, 'rb')
f.rewind()
self.assertEqual(f.getparams(), fout.getparams())
self.assertEqual(f.readframes(f.getnframes()),
fout.readframes(fout.getnframes()))
def test_read_not_from_start(self):
with open(TESTFN, 'wb') as testfile:
testfile.write(b'ababagalamaga')
with open(self.sndfilepath, 'rb') as f:
testfile.write(f.read())
with open(TESTFN, 'rb') as testfile:
self.assertEqual(testfile.read(13), b'ababagalamaga')
with self.module.open(testfile, 'rb') as f:
self.assertEqual(f.getnchannels(), self.nchannels)
self.assertEqual(f.getsampwidth(), self.sampwidth)
self.assertEqual(f.getframerate(), self.framerate)
self.assertEqual(f.getnframes(), self.sndfilenframes)
self.assertEqual(f.readframes(self.nframes), self.frames)

View file

@ -0,0 +1,5 @@
# This should be equivalent to running regrtest.py from the cmdline.
# It can be especially handy if you're in an interactive shell, e.g.,
# from test import autotest.
from test.libregrtest import main
main()

View file

@ -0,0 +1 @@
# -*- coding: uft-8 -*-

View file

@ -0,0 +1,2 @@
#coding: utf8
print('')

36
third_party/python/Lib/test/badcert.pem vendored Normal file
View file

@ -0,0 +1,36 @@
-----BEGIN RSA PRIVATE KEY-----
MIICXwIBAAKBgQC8ddrhm+LutBvjYcQlnH21PPIseJ1JVG2HMmN2CmZk2YukO+9L
opdJhTvbGfEj0DQs1IE8M+kTUyOmuKfVrFMKwtVeCJphrAnhoz7TYOuLBSqt7lVH
fhi/VwovESJlaBOp+WMnfhcduPEYHYx/6cnVapIkZnLt30zu2um+DzA9jQIDAQAB
AoGBAK0FZpaKj6WnJZN0RqhhK+ggtBWwBnc0U/ozgKz2j1s3fsShYeiGtW6CK5nU
D1dZ5wzhbGThI7LiOXDvRucc9n7vUgi0alqPQ/PFodPxAN/eEYkmXQ7W2k7zwsDA
IUK0KUhktQbLu8qF/m8qM86ba9y9/9YkXuQbZ3COl5ahTZrhAkEA301P08RKv3KM
oXnGU2UHTuJ1MAD2hOrPxjD4/wxA/39EWG9bZczbJyggB4RHu0I3NOSFjAm3HQm0
ANOu5QK9owJBANgOeLfNNcF4pp+UikRFqxk5hULqRAWzVxVrWe85FlPm0VVmHbb/
loif7mqjU8o1jTd/LM7RD9f2usZyE2psaw8CQQCNLhkpX3KO5kKJmS9N7JMZSc4j
oog58yeYO8BBqKKzpug0LXuQultYv2K4veaIO04iL9VLe5z9S/Q1jaCHBBuXAkEA
z8gjGoi1AOp6PBBLZNsncCvcV/0aC+1se4HxTNo2+duKSDnbq+ljqOM+E7odU+Nq
ewvIWOG//e8fssd0mq3HywJBAJ8l/c8GVmrpFTx8r/nZ2Pyyjt3dH1widooDXYSV
q6Gbf41Llo5sYAtmxdndTLASuHKecacTgZVhy0FryZpLKrU=
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
Just bad cert data
-----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY-----
MIICXwIBAAKBgQC8ddrhm+LutBvjYcQlnH21PPIseJ1JVG2HMmN2CmZk2YukO+9L
opdJhTvbGfEj0DQs1IE8M+kTUyOmuKfVrFMKwtVeCJphrAnhoz7TYOuLBSqt7lVH
fhi/VwovESJlaBOp+WMnfhcduPEYHYx/6cnVapIkZnLt30zu2um+DzA9jQIDAQAB
AoGBAK0FZpaKj6WnJZN0RqhhK+ggtBWwBnc0U/ozgKz2j1s3fsShYeiGtW6CK5nU
D1dZ5wzhbGThI7LiOXDvRucc9n7vUgi0alqPQ/PFodPxAN/eEYkmXQ7W2k7zwsDA
IUK0KUhktQbLu8qF/m8qM86ba9y9/9YkXuQbZ3COl5ahTZrhAkEA301P08RKv3KM
oXnGU2UHTuJ1MAD2hOrPxjD4/wxA/39EWG9bZczbJyggB4RHu0I3NOSFjAm3HQm0
ANOu5QK9owJBANgOeLfNNcF4pp+UikRFqxk5hULqRAWzVxVrWe85FlPm0VVmHbb/
loif7mqjU8o1jTd/LM7RD9f2usZyE2psaw8CQQCNLhkpX3KO5kKJmS9N7JMZSc4j
oog58yeYO8BBqKKzpug0LXuQultYv2K4veaIO04iL9VLe5z9S/Q1jaCHBBuXAkEA
z8gjGoi1AOp6PBBLZNsncCvcV/0aC+1se4HxTNo2+duKSDnbq+ljqOM+E7odU+Nq
ewvIWOG//e8fssd0mq3HywJBAJ8l/c8GVmrpFTx8r/nZ2Pyyjt3dH1widooDXYSV
q6Gbf41Llo5sYAtmxdndTLASuHKecacTgZVhy0FryZpLKrU=
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
Just bad cert data
-----END CERTIFICATE-----

40
third_party/python/Lib/test/badkey.pem vendored Normal file
View file

@ -0,0 +1,40 @@
-----BEGIN RSA PRIVATE KEY-----
Bad Key, though the cert should be OK
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIICpzCCAhCgAwIBAgIJAP+qStv1cIGNMA0GCSqGSIb3DQEBBQUAMIGJMQswCQYD
VQQGEwJVUzERMA8GA1UECBMIRGVsYXdhcmUxEzARBgNVBAcTCldpbG1pbmd0b24x
IzAhBgNVBAoTGlB5dGhvbiBTb2Z0d2FyZSBGb3VuZGF0aW9uMQwwCgYDVQQLEwNT
U0wxHzAdBgNVBAMTFnNvbWVtYWNoaW5lLnB5dGhvbi5vcmcwHhcNMDcwODI3MTY1
NDUwWhcNMTMwMjE2MTY1NDUwWjCBiTELMAkGA1UEBhMCVVMxETAPBgNVBAgTCERl
bGF3YXJlMRMwEQYDVQQHEwpXaWxtaW5ndG9uMSMwIQYDVQQKExpQeXRob24gU29m
dHdhcmUgRm91bmRhdGlvbjEMMAoGA1UECxMDU1NMMR8wHQYDVQQDExZzb21lbWFj
aGluZS5weXRob24ub3JnMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8ddrh
m+LutBvjYcQlnH21PPIseJ1JVG2HMmN2CmZk2YukO+9LopdJhTvbGfEj0DQs1IE8
M+kTUyOmuKfVrFMKwtVeCJphrAnhoz7TYOuLBSqt7lVHfhi/VwovESJlaBOp+WMn
fhcduPEYHYx/6cnVapIkZnLt30zu2um+DzA9jQIDAQABoxUwEzARBglghkgBhvhC
AQEEBAMCBkAwDQYJKoZIhvcNAQEFBQADgYEAF4Q5BVqmCOLv1n8je/Jw9K669VXb
08hyGzQhkemEBYQd6fzQ9A/1ZzHkJKb1P6yreOLSEh4KcxYPyrLRC1ll8nr5OlCx
CMhKkTnR6qBsdNV0XtdU2+N25hqW+Ma4ZeqsN/iiJVCGNOZGnvQuvCAGWF8+J/f/
iHkC6gGdBJhogs4=
-----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY-----
Bad Key, though the cert should be OK
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIICpzCCAhCgAwIBAgIJAP+qStv1cIGNMA0GCSqGSIb3DQEBBQUAMIGJMQswCQYD
VQQGEwJVUzERMA8GA1UECBMIRGVsYXdhcmUxEzARBgNVBAcTCldpbG1pbmd0b24x
IzAhBgNVBAoTGlB5dGhvbiBTb2Z0d2FyZSBGb3VuZGF0aW9uMQwwCgYDVQQLEwNT
U0wxHzAdBgNVBAMTFnNvbWVtYWNoaW5lLnB5dGhvbi5vcmcwHhcNMDcwODI3MTY1
NDUwWhcNMTMwMjE2MTY1NDUwWjCBiTELMAkGA1UEBhMCVVMxETAPBgNVBAgTCERl
bGF3YXJlMRMwEQYDVQQHEwpXaWxtaW5ndG9uMSMwIQYDVQQKExpQeXRob24gU29m
dHdhcmUgRm91bmRhdGlvbjEMMAoGA1UECxMDU1NMMR8wHQYDVQQDExZzb21lbWFj
aGluZS5weXRob24ub3JnMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8ddrh
m+LutBvjYcQlnH21PPIseJ1JVG2HMmN2CmZk2YukO+9LopdJhTvbGfEj0DQs1IE8
M+kTUyOmuKfVrFMKwtVeCJphrAnhoz7TYOuLBSqt7lVHfhi/VwovESJlaBOp+WMn
fhcduPEYHYx/6cnVapIkZnLt30zu2um+DzA9jQIDAQABoxUwEzARBglghkgBhvhC
AQEEBAMCBkAwDQYJKoZIhvcNAQEFBQADgYEAF4Q5BVqmCOLv1n8je/Jw9K669VXb
08hyGzQhkemEBYQd6fzQ9A/1ZzHkJKb1P6yreOLSEh4KcxYPyrLRC1ll8nr5OlCx
CMhKkTnR6qBsdNV0XtdU2+N25hqW+Ma4ZeqsN/iiJVCGNOZGnvQuvCAGWF8+J/f/
iHkC6gGdBJhogs4=
-----END CERTIFICATE-----

View file

@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
= 2

View file

@ -0,0 +1,3 @@
from __future__ import absolute_import
"spam, bar, blah"
from __future__ import print_function

View file

@ -0,0 +1,10 @@
"""This is a test"""
from __future__ import nested_scopes
from __future__ import rested_snopes
def f(x):
def g(y):
return x + y
return g
result = f(2)(4)

View file

@ -0,0 +1,10 @@
"""This is a test"""
import __future__
from __future__ import nested_scopes
def f(x):
def g(y):
return x + y
return g
result = f(2)(4)

View file

@ -0,0 +1,12 @@
"""This is a test"""
from __future__ import nested_scopes
import foo
from __future__ import nested_scopes
def f(x):
def g(y):
return x + y
return g
result = f(2)(4)

View file

@ -0,0 +1,10 @@
"""This is a test"""
"this isn't a doc string"
from __future__ import nested_scopes
def f(x):
def g(y):
return x + y
return g
result = f(2)(4)

View file

@ -0,0 +1,11 @@
"""This is a test"""
from __future__ import nested_scopes; import string; from __future__ import \
nested_scopes
def f(x):
def g(y):
return x + y
return g
result = f(2)(4)

View file

@ -0,0 +1,10 @@
"""This is a test"""
from __future__ import *
def f(x):
def g(y):
return x + y
return g
print(f(2)(4))

View file

@ -0,0 +1,10 @@
"""This is a test"""
from __future__ import nested_scopes, braces
def f(x):
def g(y):
return x + y
return g
print(f(2)(4))

View file

@ -0,0 +1 @@
print("böse")

167
third_party/python/Lib/test/bisect.py vendored Executable file
View file

@ -0,0 +1,167 @@
#!/usr/bin/env python3
"""
Command line tool to bisect failing CPython tests.
Find the test_os test method which alters the environment:
./python -m test.bisect --fail-env-changed test_os
Find a reference leak in "test_os", write the list of failing tests into the
"bisect" file:
./python -m test.bisect -o bisect -R 3:3 test_os
Load an existing list of tests from a file using -i option:
./python -m test --list-cases -m FileTests test_os > tests
./python -m test.bisect -i tests test_os
"""
import argparse
import datetime
import os.path
import math
import random
import subprocess
import sys
import tempfile
import time
def write_tests(filename, tests):
with open(filename, "w") as fp:
for name in tests:
print(name, file=fp)
fp.flush()
def write_output(filename, tests):
if not filename:
return
print("Writing %s tests into %s" % (len(tests), filename))
write_tests(filename, tests)
return filename
def format_shell_args(args):
return ' '.join(args)
def list_cases(args):
cmd = [sys.executable, '-m', 'test', '--list-cases']
cmd.extend(args.test_args)
proc = subprocess.run(cmd,
stdout=subprocess.PIPE,
universal_newlines=True)
exitcode = proc.returncode
if exitcode:
cmd = format_shell_args(cmd)
print("Failed to list tests: %s failed with exit code %s"
% (cmd, exitcode))
sys.exit(exitcode)
tests = proc.stdout.splitlines()
return tests
def run_tests(args, tests, huntrleaks=None):
tmp = tempfile.mktemp()
try:
write_tests(tmp, tests)
cmd = [sys.executable, '-m', 'test', '--matchfile', tmp]
cmd.extend(args.test_args)
print("+ %s" % format_shell_args(cmd))
proc = subprocess.run(cmd)
return proc.returncode
finally:
if os.path.exists(tmp):
os.unlink(tmp)
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('-i', '--input',
help='Test names produced by --list-tests written '
'into a file. If not set, run --list-tests')
parser.add_argument('-o', '--output',
help='Result of the bisection')
parser.add_argument('-n', '--max-tests', type=int, default=1,
help='Maximum number of tests to stop the bisection '
'(default: 1)')
parser.add_argument('-N', '--max-iter', type=int, default=100,
help='Maximum number of bisection iterations '
'(default: 100)')
# FIXME: document that following arguments are test arguments
args, test_args = parser.parse_known_args()
args.test_args = test_args
return args
def main():
args = parse_args()
if args.input:
with open(args.input) as fp:
tests = [line.strip() for line in fp]
else:
tests = list_cases(args)
print("Start bisection with %s tests" % len(tests))
print("Test arguments: %s" % format_shell_args(args.test_args))
print("Bisection will stop when getting %s or less tests "
"(-n/--max-tests option), or after %s iterations "
"(-N/--max-iter option)"
% (args.max_tests, args.max_iter))
output = write_output(args.output, tests)
print()
start_time = time.monotonic()
iteration = 1
try:
while len(tests) > args.max_tests and iteration <= args.max_iter:
ntest = len(tests)
ntest = max(ntest // 2, 1)
subtests = random.sample(tests, ntest)
print("[+] Iteration %s: run %s tests/%s"
% (iteration, len(subtests), len(tests)))
print()
exitcode = run_tests(args, subtests)
print("ran %s tests/%s" % (ntest, len(tests)))
print("exit", exitcode)
if exitcode:
print("Tests failed: continuing with this subtest")
tests = subtests
output = write_output(args.output, tests)
else:
print("Tests succeeded: skipping this subtest, trying a new subset")
print()
iteration += 1
except KeyboardInterrupt:
print()
print("Bisection interrupted!")
print()
print("Tests (%s):" % len(tests))
for test in tests:
print("* %s" % test)
print()
if output:
print("Output written into %s" % output)
dt = math.ceil(time.monotonic() - start_time)
if len(tests) <= args.max_tests:
print("Bisection completed in %s iterations and %s"
% (iteration, datetime.timedelta(seconds=dt)))
sys.exit(1)
else:
print("Bisection failed after %s iterations and %s"
% (iteration, datetime.timedelta(seconds=dt)))
if __name__ == "__main__":
main()

View file

@ -0,0 +1,41 @@
"""bytecode_helper - support tools for testing correct bytecode generation"""
import unittest
import dis
import io
_UNSPECIFIED = object()
class BytecodeTestCase(unittest.TestCase):
"""Custom assertion methods for inspecting bytecode."""
def get_disassembly_as_string(self, co):
s = io.StringIO()
dis.dis(co, file=s)
return s.getvalue()
def assertInBytecode(self, x, opname, argval=_UNSPECIFIED):
"""Returns instr if op is found, otherwise throws AssertionError"""
for instr in dis.get_instructions(x):
if instr.opname == opname:
if argval is _UNSPECIFIED or instr.argval == argval:
return instr
disassembly = self.get_disassembly_as_string(x)
if argval is _UNSPECIFIED:
msg = '%s not found in bytecode:\n%s' % (opname, disassembly)
else:
msg = '(%s,%r) not found in bytecode:\n%s'
msg = msg % (opname, argval, disassembly)
self.fail(msg)
def assertNotInBytecode(self, x, opname, argval=_UNSPECIFIED):
"""Throws AssertionError if op is found"""
for instr in dis.get_instructions(x):
if instr.opname == opname:
disassembly = self.get_disassembly_as_string(x)
if argval is _UNSPECIFIED:
msg = '%s occurs in bytecode:\n%s' % (opname, disassembly)
elif instr.argval == argval:
msg = '(%s,%r) occurs in bytecode:\n%s'
msg = msg % (opname, argval, disassembly)
self.fail(msg)

View file

@ -0,0 +1,14 @@
-----BEGIN CERTIFICATE-----
MIICLDCCAdYCAQAwDQYJKoZIhvcNAQEEBQAwgaAxCzAJBgNVBAYTAlBUMRMwEQYD
VQQIEwpRdWVlbnNsYW5kMQ8wDQYDVQQHEwZMaXNib2ExFzAVBgNVBAoTDk5ldXJv
bmlvLCBMZGEuMRgwFgYDVQQLEw9EZXNlbnZvbHZpbWVudG8xGzAZBgNVBAMTEmJy
dXR1cy5uZXVyb25pby5wdDEbMBkGCSqGSIb3DQEJARYMc2FtcG9AaWtpLmZpMB4X
DTk2MDkwNTAzNDI0M1oXDTk2MTAwNTAzNDI0M1owgaAxCzAJBgNVBAYTAlBUMRMw
EQYDVQQIEwpRdWVlbnNsYW5kMQ8wDQYDVQQHEwZMaXNib2ExFzAVBgNVBAoTDk5l
dXJvbmlvLCBMZGEuMRgwFgYDVQQLEw9EZXNlbnZvbHZpbWVudG8xGzAZBgNVBAMT
EmJydXR1cy5uZXVyb25pby5wdDEbMBkGCSqGSIb3DQEJARYMc2FtcG9AaWtpLmZp
MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAL7+aty3S1iBA/+yxjxv4q1MUTd1kjNw
L4lYKbpzzlmC5beaQXeQ2RmGMTXU+mDvuqItjVHOK3DvPK7lTcSGftUCAwEAATAN
BgkqhkiG9w0BAQQFAANBAFqPEKFjk6T6CKTHvaQeEAsX0/8YHPHqH/9AnhSjrwuX
9EBc0n6bVGhN7XaXd6sJ7dym9sbsWxb+pJdurnkxjx4=
-----END CERTIFICATE-----

View file

@ -0,0 +1,41 @@
-----BEGIN CERTIFICATE-----
MIIHPTCCBSWgAwIBAgIBADANBgkqhkiG9w0BAQQFADB5MRAwDgYDVQQKEwdSb290
IENBMR4wHAYDVQQLExVodHRwOi8vd3d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lgX4HgJpj+CzDQLyP1CraPtHuCLdNp4TK9D+hmEW+sQVp59/Xmasb7oswzPf8
59QLF66Xv+R7/Q+ntIV541niFoe/HylFLCOTdr7Ahx3e7CtCauW7yPQKSggKjFzY
fU3RuL/V9yntktGUBOg1Bld/LCOXh6U1jSbTGkfyFtfZxtQfI0PTJpk5yiD0cSNv
DEp2dvd2H7P+v0ew/CpWgeHS3e4I2PT/WtwlYYqRArmGHPJQc3YlNfy2JSYVy+vE
K2EMHOfuLxeb7PDUoYTn0q/e5BskFKcBh+OrKVhGoNnACuCN11nTG/hUID54paXI
T4sDxJaf7PtHz3YtjWU0J7/6rgEFivOSCt2JbJehx+dgUees60t9LLhlyf5dakhV
juTH+WpA4bhkRem1WSmlX899WH1keeWkCawedmU9lMRo
-----END CERTIFICATE-----

View file

@ -0,0 +1,3 @@
# Also used by idlelib.test_idle.test_config.
[Foo Bar]
foo=newbar

537
third_party/python/Lib/test/cfgparser.2 vendored Normal file
View file

@ -0,0 +1,537 @@
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command #"testparm" # to check that you have not made any basic syntactic #errors.
#
#======================= Global Settings =====================================
[global]
# 1. Server Naming Options:
# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = MDKGROUP
# netbios name is the name you will see in "Network Neighbourhood",
# but defaults to your hostname
; netbios name = <name_of_this_server>
# server string is the equivalent of the NT Description field
server string = Samba Server %v
# Message command is run by samba when a "popup" message is sent to it.
# The example below is for use with LinPopUp:
; message command = /usr/bin/linpopup "%f" "%m" %s; rm %s
# 2. Printing Options:
# CHANGES TO ENABLE PRINTING ON ALL CUPS PRINTERS IN THE NETWORK
# (as cups is now used in linux-mandrake 7.2 by default)
# if you want to automatically load your printer list rather
# than setting them up individually then you'll need this
printcap name = lpstat
load printers = yes
# It should not be necessary to spell out the print system type unless
# yours is non-standard. Currently supported print systems include:
# bsd, sysv, plp, lprng, aix, hpux, qnx, cups
printing = cups
# Samba 2.2 supports the Windows NT-style point-and-print feature. To
# use this, you need to be able to upload print drivers to the samba
# server. The printer admins (or root) may install drivers onto samba.
# Note that this feature uses the print$ share, so you will need to
# enable it below.
# This parameter works like domain admin group:
# printer admin = @<group> <user>
; printer admin = @adm
# This should work well for winbind:
; printer admin = @"Domain Admins"
# 3. Logging Options:
# this tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/log.%m
# Put a capping on the size of the log files (in Kb).
max log size = 50
# Set the log (verbosity) level (0 <= log level <= 10)
; log level = 3
# 4. Security and Domain Membership Options:
# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page. Do not enable this if (tcp/ip) name resolution #does
# not work for all the hosts in your network.
; hosts allow = 192.168.1. 192.168.2. 127.
hosts allow = 127. //note this is only my private IP address
# Uncomment this if you want a guest account, you must add this to
# /etc/passwd
# otherwise the user "nobody" is used
; guest account = pcguest
# Security mode. Most people will want user level security. See
# security_level.txt for details.
security = user
# Use password server option only with security = server or security = # domain
# When using security = domain, you should use password server = *
; password server =
; password server = *
# Password Level allows matching of _n_ characters of the password for
# all combinations of upper and lower case.
password level = 8
; username level = 8
# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
# Encrypted passwords are required for any use of samba in a Windows NT #domain
# The smbpasswd file is only required by a server doing authentication, #thus members of a domain do not need one.
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
# The following are needed to allow password changing from Windows to
# also update the Linux system password.
# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
# NOTE2: You do NOT need these to allow workstations to change only
# the encrypted SMB passwords. They allow the Unix password
# to be kept in sync with the SMB password.
; unix password sync = Yes
# You either need to setup a passwd program and passwd chat, or
# enable pam password change
; pam password change = yes
; passwd program = /usr/bin/passwd %u
; passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password*
# %n\n
;*passwd:*all*authentication*tokens*updated*successfully*
# Unix users can map to different SMB User names
; username map = /etc/samba/smbusers
# Using the following line enables you to customize your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
; include = /etc/samba/smb.conf.%m
# Options for using winbind. Winbind allows you to do all account and
# authentication from a Windows or samba domain controller, creating
# accounts on the fly, and maintaining a mapping of Windows RIDs to
# unix uid's
# and gid's. winbind uid and winbind gid are the only required
# parameters.
#
# winbind uid is the range of uid's winbind can use when mapping RIDs #to uid's
; winbind uid = 10000-20000
#
# winbind gid is the range of uid's winbind can use when mapping RIDs
# to gid's
; winbind gid = 10000-20000
#
# winbind separator is the character a user must use between their
# domain name and username, defaults to "\"
; winbind separator = +
#
# winbind use default domain allows you to have winbind return
# usernames in the form user instead of DOMAIN+user for the domain
# listed in the workgroup parameter.
; winbind use default domain = yes
#
# template homedir determines the home directory for winbind users,
# with %D expanding to their domain name and %U expanding to their
# username:
; template homedir = /home/%D/%U
# When using winbind, you may want to have samba create home
# directories on the fly for authenticated users. Ensure that
# /etc/pam.d/samba is using 'service=system-auth-winbind' in pam_stack
# modules, and then enable obedience of pam restrictions below:
; obey pam restrictions = yes
#
# template shell determines the shell users authenticated by winbind #get
; template shell = /bin/bash
# 5. Browser Control and Networking Options:
# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
; interfaces = 192.168.12.2/24 192.168.13.2/24
# Configure remote browse list synchronisation here
# request announcement to, or browse list sync from:
# a specific host or from / to a whole subnet (see below)
; remote browse sync = 192.168.3.25 192.168.5.255
# Cause this host to announce itself to local subnets here
; remote announce = 192.168.1.255 192.168.2.44
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
; local master = no
# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
; os level = 33
# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
; domain master = yes
# Preferred Master causes Samba to force a local browser election on
# startup and gives it a slightly higher chance of winning the election
; preferred master = yes
# 6. Domain Control Options:
# Enable this if you want Samba to be a domain logon server for
# Windows95 workstations or Primary Domain Controller for WinNT and
# Win2k
; domain logons = yes
# if you enable domain logons then you may want a per-machine or
# per user logon script
# run a specific logon batch file per workstation (machine)
; logon script = %m.bat
# run a specific logon batch file per username
; logon script = %U.bat
# Where to store roaming profiles for WinNT and Win2k
# %L substitutes for this servers netbios name, %U is username
# You must uncomment the [Profiles] share below
; logon path = \\%L\Profiles\%U
# Where to store roaming profiles for Win9x. Be careful with this as it
# also impacts where Win2k finds it's /HOME share
; logon home = \\%L\%U\.profile
# The add user script is used by a domain member to add local user
# accounts that have been authenticated by the domain controller, or by
# the domain controller to add local machine accounts when adding
# machines to the domain.
# The script must work from the command line when replacing the macros,
# or the operation will fail. Check that groups exist if forcing a
# group.
# Script for domain controller for adding machines:
; add user script = /usr/sbin/useradd -d /dev/null -g machines c
# 'Machine Account' -s /bin/false -M %u
# Script for domain controller with LDAP backend for adding machines
#(please
# configure in /etc/samba/smbldap_conf.pm first):
; add user script = /usr/share/samba/scripts/smbldap-useradd.pl -w d
# /dev/null -g machines -c 'Machine Account' -s /bin/false %u
# Script for domain member for adding local accounts for authenticated
# users:
; add user script = /usr/sbin/useradd -s /bin/false %u
# Domain groups:
# domain admin group is a list of unix users or groups who are made
# members
# of the Domain Admin group
; domain admin group = root @wheel
#
# domain guest groups is a list of unix users or groups who are made
# members
# of the Domain Guests group
; domain guest group = nobody @guest
# LDAP configuration for Domain Controlling:
# The account (dn) that samba uses to access the LDAP server
# This account needs to have write access to the LDAP tree
# You will need to give samba the password for this dn, by
# running 'smbpasswd -w mypassword'
; ldap admin dn = cn=root,dc=mydomain,dc=com
; ldap ssl = start_tls
# start_tls should run on 389, but samba defaults incorrectly to 636
; ldap port = 389
; ldap suffix = dc=mydomain,dc=com
; ldap server = ldap.mydomain.com
# 7. Name Resolution Options:
# All NetBIOS names must be resolved to IP Addresses
# 'Name Resolve Order' allows the named resolution mechanism to be
# specified the default order is "host lmhosts wins bcast". "host"
# means use the unix system gethostbyname() function call that will use
# either /etc/hosts OR DNS or NIS depending on the settings of
# /etc/host.config, /etc/nsswitch.conf
# and the /etc/resolv.conf file. "host" therefore is system
# configuration dependent. This parameter is most often of use to
# prevent DNS lookups
# in order to resolve NetBIOS names to IP Addresses. Use with care!
# The example below excludes use of name resolution for machines that
# are NOT on the local network segment - OR - are not deliberately to
# be known via lmhosts or via WINS.
; name resolve order = wins lmhosts bcast
# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS
# Server
; wins support = yes
# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but
# NOT both
; wins server = w.x.y.z
# WINS Proxy - Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client, for this to work there must be
# at least one WINS Server on the network. The default is NO.
; wins proxy = yes
# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS
# names via DNS nslookups. The built-in default for versions 1.9.17 is
# yes, this has been changed in version 1.9.18 to no.
dns proxy = no
# 8. File Naming Options:
# Case Preservation can be handy - system default is _no_
# NOTE: These can be set on a per share basis
; preserve case = no
; short preserve case = no
# Default case is normally upper case for all DOS files
; default case = lower
# Be very careful with case sensitivity - it can break things!
; case sensitive = no
# Enabling internationalization:
# you can match a Windows code page with a UNIX character set.
# Windows: 437 (US), 737 (GREEK), 850 (Latin1 - Western European),
# 852 (Eastern Eu.), 861 (Icelandic), 932 (Cyrillic - Russian),
# 936 (Japanese - Shift-JIS), 936 (Simpl. Chinese), 949 (Korean
# Hangul),
# 950 (Trad. Chin.).
# UNIX: ISO8859-1 (Western European), ISO8859-2 (Eastern Eu.),
# ISO8859-5 (Russian Cyrillic), KOI8-R (Alt-Russ. Cyril.)
# This is an example for french users:
; client code page = 850
; character set = ISO8859-1
#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writable = yes
# You can enable VFS recycle bin on a per share basis:
# Uncomment the next 2 lines (make sure you create a
# .recycle folder in the base of the share and ensure
# all users will have write access to it. See
# examples/VFS/recycle/REAME in samba-doc for details
; vfs object = /usr/lib/samba/vfs/recycle.so
; vfs options= /etc/samba/recycle.conf
# Un-comment the following and create the netlogon directory for Domain
# Logons
; [netlogon]
; comment = Network Logon Service
; path = /var/lib/samba/netlogon
; guest ok = yes
; writable = no
#Uncomment the following 2 lines if you would like your login scripts
# to be created dynamically by ntlogon (check that you have it in the
# correct location (the default of the ntlogon rpm available in
# contribs)
;root preexec = /usr/bin/ntlogon -u %U -g %G -o %a -d /var/lib/samba/netlogon
;root postexec = rm -f /var/lib/samba/netlogon/%U.bat
# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;[Profiles]
; path = /var/lib/samba/profiles
; browseable = no
; guest ok = yes
# NOTE: If you have a CUPS print system there is no need to
# specifically define each individual printer.
# You must configure the samba printers with the appropriate Windows
# drivers on your Windows clients. On the Samba server no filtering is
# done. If you wish that the server provides the driver and the clients
# send PostScript ("Generic PostScript Printer" under Windows), you
# have to swap the 'print command' line below with the commented one.
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
# to allow user 'guest account' to print.
guest ok = yes
writable = no
printable = yes
create mode = 0700
# =====================================
# print command: see above for details.
# =====================================
print command = lpr-cups -P %p -o raw %s -r
# using client side printer drivers.
; print command = lpr-cups -P %p %s
# using cups own drivers (use generic PostScript on clients).
# The following two commands are the samba defaults for printing=cups
# change them only if you need different options:
; lpq command = lpq -P %p
; lprm command = cancel %p-%j
# This share is used for Windows NT-style point-and-print support.
# To be able to install drivers, you need to be either root, or listed
# in the printer admin parameter above. Note that you also need write
# access to the directory and share definition to be able to upload the
# drivers.
# For more information on this, please see the Printing Support Section
# of /usr/share/doc/samba-/docs/Samba-HOWTO-Collection.pdf
[print$]
path = /var/lib/samba/printers
browseable = yes
read only = yes
write list = @adm root
# A useful application of samba is to make a PDF-generation service
# To streamline this, install windows postscript drivers (preferably
# colour)on the samba server, so that clients can automatically install
# them.
[pdf-generator]
path = /var/tmp
guest ok = No
printable = Yes
comment = PDF Generator (only valid users)
#print command = /usr/share/samba/scripts/print-pdf file path win_path recipient IP &
print command = /usr/share/samba/scripts/print-pdf %s ~%u \\\\\\\\%L\\\\%u %m %I &
# This one is useful for people to share files
[tmp]
comment = Temporary file space
path = /tmp
read only = no
public = yes
echo command = cat %s; rm %s
# A publicly accessible directory, but read only, except for people in
# the "staff" group
;[public]
; comment = Public Stuff
; path = /home/samba/public
; public = yes
; writable = no
; write list = @staff
# Audited directory through experimental VFS audit.so module:
# Uncomment next line.
; vfs object = /usr/lib/samba/vfs/audit.so
# Other examples.
#
# A private printer, usable only by Fred. Spool data will be placed in
# Fred's
# home directory. Note that fred must have write access to the spool
# directory,
# wherever it is.
;[fredsprn]
; comment = Fred's Printer
; valid users = fred
; path = /homes/fred
; printer = freds_printer
; public = no
; writable = no
; printable = yes
-----------------------------------------------------------
# A private directory, usable only by Fred. Note that Fred requires
# write access to the directory.
;[fredsdir]
[Agustin]
; comment = Fred's Service
comment = Agustin Private Files
; path = /usr/somewhere/private
path = /home/agustin/Documents
; valid users = fred
valid users = agustin
; public = no
; writable = yes
writable = yes
; printable = no
-----------------------------------------------------------
# a service which has a different directory for each machine that
# connects this allows you to tailor configurations to incoming
# machines. You could also use the %u option to tailor it by user name.
# The %m gets replaced with the machine name that is connecting.
;[pchome]
; comment = PC Directories
; path = /usr/pc/%m
; public = no
; writable = yes
-----------------------------------------------------------
# A publicly accessible directory, read/write to all users. Note that
# all files created in the directory by users will be owned by the
# default user, so any user with access can delete any other user's
# files. Obviously this directory must be writable by the default user.
# Another user could of course be specified, in which case all files
# would be owned by that user instead.
;[public]
; path = /usr/somewhere/else/public
; public = yes
; only guest = yes
; writable = yes
; printable = no
-----------------------------------------------------------
# The following two entries demonstrate how to share a directory so
# that two users can place files there that will be owned by the
# specific users. In this setup, the directory should be writable by
# both users and should have the sticky bit set on it to prevent abuse.
# Obviously this could be extended to as many users as required.
;[myshare]
; comment = Mary's and Fred's stuff
; path = /usr/somewhere/shared
; valid users = mary fred
; public = no
; writable = yes
; printable = no
; create mask = 0765

69
third_party/python/Lib/test/cfgparser.3 vendored Normal file
View file

@ -0,0 +1,69 @@
# INI with as many tricky parts as possible
# Most of them could not be used before 3.2
# This will be parsed with the following options
# delimiters = {'='}
# comment_prefixes = {'#'}
# allow_no_value = True
[DEFAULT]
go = %(interpolate)s
[strange]
values = that are indented # and end with hash comments
other = that do continue
in # and still have
other # comments mixed
lines # with the values
[corruption]
value = that is
actually still here
and holds all these weird newlines
# but not for the lines that are comments
nor the indentation
another value = # empty string
yet another # None!
[yeah, sections can be indented as well]
and that does not mean = anything
are they subsections = False
if you want subsections = use XML
lets use some Unicode = 片仮名
[another one!]
even if values are indented like this = seriously
yes, this still applies to = section "another one!"
this too = are there people with configurations broken as this?
beware, this is going to be a continuation
of the value for
key "this too"
even if it has a = character
this is still the continuation
your editor probably highlights it wrong
but that's life
# let's set this value so there is no error
# when getting all items for this section:
interpolate = anything will do
[no values here]
# but there's this `go` in DEFAULT
[tricky interpolation]
interpolate = do this
lets = %(go)s
[more interpolation]
interpolate = go shopping
lets = %(go)s

View file

@ -0,0 +1,9 @@
如何在 Python 中使用既有的 C library?
 在資訊科技快速發展的今天, 開發及測試軟體的速度是不容忽視的
課題. 為加快開發及測試的速度, 我們便常希望能利用一些已開發好的
library, 並有一個 fast prototyping 的 programming language 可
供使用. 目前有許許多多的 library 是以 C 寫成, 而 Python 是一個
fast prototyping 的 programming language. 故我們希望能將既有的
C library 拿到 Python 的環境中測試及整合. 其中最主要也是我們所
要討論的問題就是:

View file

@ -0,0 +1,9 @@
如何在 Python 中使用既有的 C library?
 在資訊科技快速發展的今天, 開發及測試軟體的速度是不容忽視的
課題. 為加快開發及測試的速度, 我們便常希望能利用一些已開發好的
library, 並有一個 fast prototyping 的 programming language 可
供使用. 目前有許許多多的 library 是以 C 寫成, 而 Python 是一個
fast prototyping 的 programming language. 故我們希望能將既有的
C library 拿到 Python 的環境中測試及整合. 其中最主要也是我們所
要討論的問題就是:

View file

@ -0,0 +1,2 @@
𠄌Ě鵮罓洆
ÊÊ̄ê êê̄

View file

@ -0,0 +1,2 @@
ˆEˆ\ŠsÚ<E280B9>Ø
ˆfˆbˆ§ ˆ§ˆ£

View file

@ -0,0 +1,9 @@
똠방각하 펲시콜라
㉯㉯납!! 因九月패믤릔궈 ⓡⓖ훀¿¿¿ 긍뒙 ⓔ뎨 ㉯. .
亞영ⓔ능횹 . . . . 서울뤄 뎐학乙 家훀 ! ! !ㅠ.ㅠ
흐흐흐 ㄱㄱㄱ☆ㅠ_ㅠ 어릨 탸콰긐 뎌응 칑九들乙 ㉯드긐
설릌 家훀 . . . . 굴애쉌 ⓔ궈 ⓡ릘㉱긐 因仁川女中까즼
와쒀훀 ! ! 亞영ⓔ 家능궈 ☆上관 없능궈능 亞능뒈훀 글애듴
ⓡ려듀九 싀풔숴훀 어릨 因仁川女中싁⑨들앜!! ㉯㉯납♡ ⌒⌒*

View file

@ -0,0 +1,9 @@
稪寞陝ビ <20>衛屬塭
阱阱陶!! 孻朐篘彐埝醩掬 佺來麗000 晤<> 供絨 阱. .
銢艙供棟<EFBFBD> . . . . 憮選瘀 粟ピ錟 坅麗 ! ! !壬.壬
⺮⺮⺮ 丑丑丑≧壬_壬 橫<> 攣攜<E694A3> 筑擬 疲朐菟錟 阱萄<E998B1>
撲郄 坅麗 . . . . 掉擁餎 供掬 佺𡺉阬<F0A1BA89> 孻嬬藿澇齌梱<E9BD8C>
諦冀麗 ! ! 銢艙供 坅棟掬 ≧葞婦 橈棟掬棟 銢棟華麗 旋擁氽
佺溥菽朐 煳ジ膜麗 橫<> 孻嬬藿澇齌𠫂剁菟脗!! 阱阱陶Ⅴ ÷÷*

View file

@ -0,0 +1,8 @@
Python の開発は、1990 年ごろから開始されています。
開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。
このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。
このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。
多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。
言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。
ノか゚ ト゚ トキ喝塀 𡚴𪎌 麀齁𩛰

View file

@ -0,0 +1,8 @@
Python の開発は、1990 年ごろから開始されています。
開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。
このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。
このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。
多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。
言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。
<EFBFBD> <20> トキ<E38388><E382AD> <20><> <20><><EFBFBD>

View file

@ -0,0 +1,7 @@
Python の開発は、1990 年ごろから開始されています。
開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。
このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。
このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。
多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。
言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。

View file

@ -0,0 +1,7 @@
Python の開発は、1990 年ごろから開始されています。
開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。
このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。
このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。
多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。
言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。

View file

@ -0,0 +1,7 @@
◎ 파이썬(Python)은 배우기 쉽고, 강력한 프로그래밍 언어입니다. 파이썬은
효율적인 고수준 데이터 구조와 간단하지만 효율적인 객체지향프로그래밍을
지원합니다. 파이썬의 우아(優雅)한 문법과 동적 타이핑, 그리고 인터프리팅
환경은 파이썬을 스크립팅과 여러 분야에서와 대부분의 플랫폼에서의 빠른
애플리케이션 개발을 할 수 있는 이상적인 언어로 만들어줍니다.
☆첫가끝: 날아라 쓔쓔쓩~ 닁큼! 뜽금없이 전홥니다. 뷁. 그런거 읎다.

View file

@ -0,0 +1,7 @@
◎ 파이썬(Python)은 배우기 쉽고, 강력한 프로그래밍 언어입니다. 파이썬은
효율적인 고수준 데이터 구조와 간단하지만 효율적인 객체지향프로그래밍을
지원합니다. 파이썬의 우아(優雅)한 문법과 동적 타이핑, 그리고 인터프리팅
환경은 파이썬을 스크립팅과 여러 분야에서와 대부분의 플랫폼에서의 빠른
애플리케이션 개발을 할 수 있는 이상적인 언어로 만들어줍니다.
☆첫가끝: 날아라 ㅤㅆㅠㅤㅤㅆㅠㅤ쓩~ ㅤㄴㅢㅇ큼! ㅤㄸㅡㅇ금없이 전ㅤㅎㅘㅂ니다. ㅤㅂㅞㄺ. 그런거 ㅤㅇㅡㅄ다.

View file

@ -0,0 +1,15 @@
Python派森语言是一种功能强大而完善的通用型计算机程序设计语言
已经具有十多年的发展历史,成熟且稳定。这种语言具有非常简捷而清晰
的语法特点,适合完成各种高层任务,几乎可以在所有的操作系统中
运行。这种语言简单而强大,适合各种人士学习使用。目前,基于这
种语言的相关技术正在飞速的发展,用户数量急剧扩大,相关的资源非常多。
如何在 Python 中使用既有的 C library?
 在資訊科技快速發展的今天, 開發及測試軟體的速度是不容忽視的
課題. 為加快開發及測試的速度, 我們便常希望能利用一些已開發好的
library, 並有一個 fast prototyping 的 programming language 可
供使用. 目前有許許多多的 library 是以 C 寫成, 而 Python 是一個
fast prototyping 的 programming language. 故我們希望能將既有的
C library 拿到 Python 的環境中測試及整合. 其中最主要也是我們所
要討論的問題就是:
파이썬은 강력한 기능을 지닌 범용 컴퓨터 프로그래밍 언어다.

View file

@ -0,0 +1,15 @@
Python派森语言是一种功能强大而完善的通用型计算机程序设计语言
已经具有十多年的发展历史,成熟且稳定。这种语言具有非常简捷而清晰
的语法特点,适合完成各种高层任务,几乎可以在所有的操作系统中
运行。这种语言简单而强大,适合各种人士学习使用。目前,基于这
种语言的相关技术正在飞速的发展,用户数量急剧扩大,相关的资源非常多。
如何在 Python 中使用既有的 C library?
 在資訊科技快速發展的今天, 開發及測試軟體的速度是不容忽視的
課題. 為加快開發及測試的速度, 我們便常希望能利用一些已開發好的
library, 並有一個 fast prototyping 的 programming language 可
供使用. 目前有許許多多的 library 是以 C 寫成, 而 Python 是一個
fast prototyping 的 programming language. 故我們希望能將既有的
C library 拿到 Python 的環境中測試及整合. 其中最主要也是我們所
要討論的問題就是:
파이썬은 강력한 기능을 지닌 범용 컴퓨터 프로그래밍 언어다.

View file

@ -0,0 +1,6 @@
Python派森语言是一种功能强大而完善的通用型计算机程序设计语言
已经具有十多年的发展历史,成熟且稳定。这种语言具有非常简捷而清晰
的语法特点,适合完成各种高层任务,几乎可以在所有的操作系统中
运行。这种语言简单而强大,适合各种人士学习使用。目前,基于这
种语言的相关技术正在飞速的发展,用户数量急剧扩大,相关的资源非常多。

View file

@ -0,0 +1,6 @@
Python派森语言是一种功能强大而完善的通用型计算机程序设计语言
已经具有十多年的发展历史,成熟且稳定。这种语言具有非常简捷而清晰
的语法特点,适合完成各种高层任务,几乎可以在所有的操作系统中
运行。这种语言简单而强大,适合各种人士学习使用。目前,基于这
种语言的相关技术正在飞速的发展,用户数量急剧扩大,相关的资源非常多。

View file

@ -0,0 +1,14 @@
Python派森语言是一种功能强大而完善的通用型计算机程序设计语言
已经具有十多年的发展历史,成熟且稳定。这种语言具有非常简捷而清晰
的语法特点,适合完成各种高层任务,几乎可以在所有的操作系统中
运行。这种语言简单而强大,适合各种人士学习使用。目前,基于这
种语言的相关技术正在飞速的发展,用户数量急剧扩大,相关的资源非常多。
如何在 Python 中使用既有的 C library?
 在資訊科技快速發展的今天, 開發及測試軟體的速度是不容忽視的
課題. 為加快開發及測試的速度, 我們便常希望能利用一些已開發好的
library, 並有一個 fast prototyping 的 programming language 可
供使用. 目前有許許多多的 library 是以 C 寫成, 而 Python 是一個
fast prototyping 的 programming language. 故我們希望能將既有的
C library 拿到 Python 的環境中測試及整合. 其中最主要也是我們所
要討論的問題就是:

View file

@ -0,0 +1,14 @@
Python派森语言是一种功能强大而完善的通用型计算机程序设计语言
已经具有十多年的发展历史,成熟且稳定。这种语言具有非常简捷而清晰
的语法特点,适合完成各种高层任务,几乎可以在所有的操作系统中
运行。这种语言简单而强大,适合各种人士学习使用。目前,基于这
种语言的相关技术正在飞速的发展,用户数量急剧扩大,相关的资源非常多。
如何在 Python 中使用既有的 C library?
 在資訊科技快速發展的今天, 開發及測試軟體的速度是不容忽視的
課題. 為加快開發及測試的速度, 我們便常希望能利用一些已開發好的
library, 並有一個 fast prototyping 的 programming language 可
供使用. 目前有許許多多的 library 是以 C 寫成, 而 Python 是一個
fast prototyping 的 programming language. 故我們希望能將既有的
C library 拿到 Python 的環境中測試及整合. 其中最主要也是我們所
要討論的問題就是:

View file

@ -0,0 +1,2 @@
This sentence is in ASCII.
The next sentence is in GB.己所不欲勿施於人。Bye.

View file

@ -0,0 +1,2 @@
This sentence is in ASCII.
The next sentence is in GB.~{<:Ky2;S{#,NpJ)l6HK!#~}Bye.

View file

@ -0,0 +1,7 @@
Python の開発は、1990 年ごろから開始されています。
開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。
このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。
このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。
多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。
言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。

View file

@ -0,0 +1,7 @@
Python $B$N3+H/$O!"(B1990 $BG/$4$m$+$i3+;O$5$l$F$$$^$9!#(B
$B3+H/<T$N(B Guido van Rossum $B$O650iMQ$N%W%m%0%i%_%s%08@8l!V(BABC$B!W$N3+H/$K;22C$7$F$$$^$7$?$,!"(BABC $B$O<BMQ>e$NL\E*$K$O$"$^$jE,$7$F$$$^$;$s$G$7$?!#(B
$B$3$N$?$a!"(BGuido $B$O$h$j<BMQE*$J%W%m%0%i%_%s%08@8l$N3+H/$r3+;O$7!"1Q9q(B BBS $BJ|Aw$N%3%a%G%#HVAH!V%b%s%F%#(B $B%Q%$%=%s!W$N%U%!%s$G$"$k(B Guido $B$O$3$N8@8l$r!V(BPython$B!W$HL>$E$1$^$7$?!#(B
$B$3$N$h$&$JGX7J$+$i@8$^$l$?(B Python $B$N8@8l@_7W$O!"!V%7%s%W%k!W$G!V=,F@$,MF0W!W$H$$$&L\I8$K=EE@$,CV$+$l$F$$$^$9!#(B
$BB?$/$N%9%/%j%W%H7O8@8l$G$O%f!<%6$NL\@h$NMxJX@-$rM%@h$7$F?'!9$J5!G=$r8@8lMWAG$H$7$F<h$jF~$l$k>l9g$,B?$$$N$G$9$,!"(BPython $B$G$O$=$&$$$C$?>.:Y9)$,DI2C$5$l$k$3$H$O$"$^$j$"$j$^$;$s!#(B
$B8@8l<+BN$N5!G=$O:G>.8B$K2!$5$(!"I,MW$J5!G=$O3HD%%b%8%e!<%k$H$7$FDI2C$9$k!"$H$$$&$N$,(B Python $B$N%]%j%7!<$G$9!#(B

View file

@ -0,0 +1,7 @@
◎ 파이썬(Python)은 배우기 쉽고, 강력한 프로그래밍 언어입니다. 파이썬은
효율적인 고수준 데이터 구조와 간단하지만 효율적인 객체지향프로그래밍을
지원합니다. 파이썬의 우아(優雅)한 문법과 동적 타이핑, 그리고 인터프리팅
환경은 파이썬을 스크립팅과 여러 분야에서와 대부분의 플랫폼에서의 빠른
애플리케이션 개발을 할 수 있는 이상적인 언어로 만들어줍니다.
☆첫가끝: 날아라 쓩~ 큼! 금없이 전니다. 그런거 다.

View file

@ -0,0 +1,7 @@
$)C!] FD@L=c(Python)@: 9h?l1b =10m, 0-7BGQ GA7N1W7!9V >p>n@T4O4Y. FD@L=c@:
H?@2@{@N 0m<vAX 5%@LEM 18A6?M 0#4\GOAv88 H?@2@{@N 04C<AvGbGA7N1W7!9V@;
Av?xGU4O4Y. FD@L=c@G ?l>F(iPd:)GQ 9.9}0z 5?@{ E8@LGN, 1W8.0m @NEMGA8.FC
H/0f@: FD@L=c@; =:E)83FC0z ?)7/ :P>_?!<-?M 4k:N:P@G GC7'F{?!<-@G :|8%
>VGC8.DI@L<G 039_@; GR <v @V4B @L;s@{@N >p>n7N 885i>nA]4O4Y.
!YC90!3!: 3/>F6s >1~ E-! 1]>x@L @|4O4Y. 1W710E 4Y.

View file

@ -0,0 +1,9 @@
똠방각하 펲시콜라
㉯㉯납!! 因九月패믤릔궈 ⓡⓖ훀¿¿¿ 긍뒙 ⓔ뎨 ㉯. .
亞영ⓔ능횹 . . . . 서울뤄 뎐학乙 家훀 ! ! !ㅠ.ㅠ
흐흐흐 ㄱㄱㄱ☆ㅠ_ㅠ 어릨 탸콰긐 뎌응 칑九들乙 ㉯드긐
설릌 家훀 . . . . 굴애쉌 ⓔ궈 ⓡ릘㉱긐 因仁川女中까즼
와쒀훀 ! ! 亞영ⓔ 家능궈 ☆上관 없능궈능 亞능뒈훀 글애듴
ⓡ려듀九 싀풔숴훀 어릨 因仁川女中싁⑨들앜!! ㉯㉯납♡ ⌒⌒*

View file

@ -0,0 +1,9 @@
苘已Ê̄胊 狖砥觼𦡞
傱傱𨤳!! 鎤<><EFBFBD><E79EBA><EFBFBD>𦛚 嗍嗄烚棬棬棬 𢶤𣙀 嗀<> 傱. .
<EFBFBD><硬嗀𢘛烞 . . . . 矜<>鱝 胆胕譇 <20>;烚 ! ! !䰲.䰲
羖羖羖 ㇁㇁㇁揓䰲_䰲 氮<> 龰鰻𡀞 𦳑暈 <20><>𡟙譇 傱㻡𡀞
祇鞴 <20>;烚 . . . . <20><>捏 嗀𦛚 嗍<>僉𡀞 鎤鎟霯薤鶅蘏<E9B685>
聒瓷烚 ! ! <20><硬嗀 <20>;𢘛𦛚 揓篨䤑 渭𢘛𦛚𢘛 <20><𢘛𩤯烚 𤷫<>𨯧
嗍犏嫎<EFBFBD> <20>峞恣烚 氮<> 鎤鎟霯薤鶅<E896A4>堽𡟙揀!! 傱傱𨤳棌 摡摡*

View file

@ -0,0 +1,7 @@
Python の開発は、1990 年ごろから開始されています。
開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。
このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。
このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。
多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。
言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。

View file

@ -0,0 +1,7 @@
Python の開発は、1990 年ごろから開始されています。
開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。
このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。
このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。
多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。
言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。

View file

@ -0,0 +1,8 @@
Python の開発は、1990 年ごろから開始されています。
開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。
このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。
このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。
多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。
言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。
ノか゚ ト゚ トキ喝塀 𡚴𪎌 麀齁𩛰

View file

@ -0,0 +1,8 @@
Python の開発は、1990 年ごろから開始されています。
開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。
このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。
このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。
多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。
言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。
<EFBFBD> <20> トキ<E38388><E382AD> <20><> <20><>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,4 @@
#coding:latin1

View file

@ -0,0 +1,20 @@
This directory only contains tests for outstanding bugs that cause the
interpreter to segfault. Ideally this directory should always be empty, but
sometimes it may not be easy to fix the underlying cause and the bug is deemed
too obscure to invest the effort.
Each test should fail when run from the command line:
./python Lib/test/crashers/weakref_in_del.py
Put as much info into a docstring or comments to help determine the cause of the
failure, as well as a bugs.python.org issue number if it exists. Particularly
note if the cause is system or environment dependent and what the variables are.
Once the crash is fixed, the test case should be moved into an appropriate test
(even if it was originally from the test suite). This ensures the regression
doesn't happen again. And if it does, it should be easier to track down.
Also see Lib/test_crashers.py which exercises the crashers in this directory.
In particular, make sure to add any new infinite loop crashers to the black
list so it doesn't try to run them.

View file

@ -0,0 +1,19 @@
"""
Broken bytecode objects can easily crash the interpreter.
This is not going to be fixed. It is generally agreed that there is no
point in writing a bytecode verifier and putting it in CPython just for
this. Moreover, a verifier is bound to accept only a subset of all safe
bytecodes, so it could lead to unnecessary breakage.
For security purposes, "restricted" interpreters are not going to let
the user build or load random bytecodes anyway. Otherwise, this is a
"won't fix" case.
"""
import types
co = types.CodeType(0, 0, 0, 0, 0, b'\x04\x71\x00\x00',
(), (), (), '', '', 1, b'')
exec(co)

View file

@ -0,0 +1,32 @@
"""
gc.get_referrers() can be used to see objects before they are fully built.
Note that this is only an example. There are many ways to crash Python
by using gc.get_referrers(), as well as many extension modules (even
when they are using perfectly documented patterns to build objects).
Identifying and removing all places that expose to the GC a
partially-built object is a long-term project. A patch was proposed on
SF specifically for this example but I consider fixing just this single
example a bit pointless (#1517042).
A fix would include a whole-scale code review, possibly with an API
change to decouple object creation and GC registration, and according
fixes to the documentation for extension module writers. It's unlikely
to happen, though. So this is currently classified as
"gc.get_referrers() is dangerous, use only for debugging".
"""
import gc
def g():
marker = object()
yield marker
# now the marker is in the tuple being constructed
[tup] = [x for x in gc.get_referrers(marker) if type(x) is tuple]
print(tup)
print(tup[1])
tuple(g())

View file

@ -0,0 +1,16 @@
# This was taken from http://python.org/sf/1541697
# It's not technically a crasher. It may not even truly be infinite,
# however, I haven't waited a long time to see the result. It takes
# 100% of CPU while running this and should be fixed.
import re
starttag = re.compile(r'<[a-zA-Z][-_.:a-zA-Z0-9]*\s*('
r'\s*([a-zA-Z_][-:.a-zA-Z_0-9]*)(\s*=\s*'
r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./,:;+*%?!&$\(\)_#=~@]'
r'[][\-a-zA-Z0-9./,:;+*%?!&$\(\)_#=~\'"@]*(?=[\s>/<])))?'
r')*\s*/?\s*(?=[<>])')
if __name__ == '__main__':
foo = '<table cellspacing="0" cellpadding="0" style="border-collapse'
starttag.match(foo)

View file

@ -0,0 +1,31 @@
# The cycle GC collector can be executed when any GC-tracked object is
# allocated, e.g. during a call to PyList_New(), PyDict_New(), ...
# Moreover, it can invoke arbitrary Python code via a weakref callback.
# This means that there are many places in the source where an arbitrary
# mutation could unexpectedly occur.
# The example below shows list_slice() not expecting the call to
# PyList_New to mutate the input list. (Of course there are many
# more examples like this one.)
import weakref
class A(object):
pass
def callback(x):
del lst[:]
keepalive = []
for i in range(100):
lst = [str(i)]
a = A()
a.cycle = a
keepalive.append(weakref.ref(a, callback))
del a
while lst:
keepalive.append(lst[:])

View file

@ -0,0 +1,15 @@
#!/usr/bin/env python3
# No bug report AFAIK, mail on python-dev on 2006-01-10
# This is a "won't fix" case. It is known that setting a high enough
# recursion limit crashes by overflowing the stack. Unless this is
# redesigned somehow, it won't go away.
import sys
sys.setrecursionlimit(1 << 30)
f = lambda f:f(f)
if __name__ == '__main__':
f(f)

View file

@ -0,0 +1,27 @@
"""
From http://bugs.python.org/issue6717
A misbehaving trace hook can trigger a segfault by exceeding the recursion
limit.
"""
import sys
def x():
pass
def g(*args):
if True: # change to True to crash interpreter
try:
x()
except:
pass
return g
def f():
print(sys.getrecursionlimit())
f()
sys.settrace(g)
f()

View file

@ -0,0 +1,20 @@
import gc
thingy = object()
class A(object):
def f(self):
return 1
x = thingy
r = gc.get_referrers(thingy)
if "__module__" in r[0]:
dct = r[0]
else:
dct = r[1]
a = A()
for i in range(10):
a.f()
dct["f"] = lambda self: 2
print(a.f()) # should print 1

46
third_party/python/Lib/test/curses_tests.py vendored Executable file
View file

@ -0,0 +1,46 @@
#!/usr/bin/env python3
#
# $Id: ncurses.py 36559 2004-07-18 05:56:09Z tim_one $
#
# Interactive test suite for the curses module.
# This script displays various things and the user should verify whether
# they display correctly.
#
import curses
from curses import textpad
def test_textpad(stdscr, insert_mode=False):
ncols, nlines = 8, 3
uly, ulx = 3, 2
if insert_mode:
mode = 'insert mode'
else:
mode = 'overwrite mode'
stdscr.addstr(uly-3, ulx, "Use Ctrl-G to end editing (%s)." % mode)
stdscr.addstr(uly-2, ulx, "Be sure to try typing in the lower-right corner.")
win = curses.newwin(nlines, ncols, uly, ulx)
textpad.rectangle(stdscr, uly-1, ulx-1, uly + nlines, ulx + ncols)
stdscr.refresh()
box = textpad.Textbox(win, insert_mode)
contents = box.edit()
stdscr.addstr(uly+ncols+2, 0, "Text entered in the box\n")
stdscr.addstr(repr(contents))
stdscr.addstr('\n')
stdscr.addstr('Press any key')
stdscr.getch()
for i in range(3):
stdscr.move(uly+ncols+2 + i, 0)
stdscr.clrtoeol()
def main(stdscr):
stdscr.clear()
test_textpad(stdscr, False)
test_textpad(stdscr, True)
if __name__ == '__main__':
curses.wrapper(main)

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,161 @@
------------------------------------------------------------------------
-- abs.decTest -- decimal absolute value --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- This set of tests primarily tests the existence of the operator.
-- Additon, subtraction, rounding, and more overflows are tested
-- elsewhere.
precision: 9
rounding: half_up
maxExponent: 384
minexponent: -383
extended: 1
absx001 abs '1' -> '1'
absx002 abs '-1' -> '1'
absx003 abs '1.00' -> '1.00'
absx004 abs '-1.00' -> '1.00'
absx005 abs '0' -> '0'
absx006 abs '0.00' -> '0.00'
absx007 abs '00.0' -> '0.0'
absx008 abs '00.00' -> '0.00'
absx009 abs '00' -> '0'
absx010 abs '-2' -> '2'
absx011 abs '2' -> '2'
absx012 abs '-2.00' -> '2.00'
absx013 abs '2.00' -> '2.00'
absx014 abs '-0' -> '0'
absx015 abs '-0.00' -> '0.00'
absx016 abs '-00.0' -> '0.0'
absx017 abs '-00.00' -> '0.00'
absx018 abs '-00' -> '0'
absx020 abs '-2000000' -> '2000000'
absx021 abs '2000000' -> '2000000'
precision: 7
absx022 abs '-2000000' -> '2000000'
absx023 abs '2000000' -> '2000000'
precision: 6
absx024 abs '-2000000' -> '2.00000E+6' Rounded
absx025 abs '2000000' -> '2.00000E+6' Rounded
precision: 3
absx026 abs '-2000000' -> '2.00E+6' Rounded
absx027 abs '2000000' -> '2.00E+6' Rounded
absx030 abs '+0.1' -> '0.1'
absx031 abs '-0.1' -> '0.1'
absx032 abs '+0.01' -> '0.01'
absx033 abs '-0.01' -> '0.01'
absx034 abs '+0.001' -> '0.001'
absx035 abs '-0.001' -> '0.001'
absx036 abs '+0.000001' -> '0.000001'
absx037 abs '-0.000001' -> '0.000001'
absx038 abs '+0.000000000001' -> '1E-12'
absx039 abs '-0.000000000001' -> '1E-12'
-- examples from decArith
precision: 9
absx040 abs '2.1' -> '2.1'
absx041 abs '-100' -> '100'
absx042 abs '101.5' -> '101.5'
absx043 abs '-101.5' -> '101.5'
-- more fixed, potential LHS swaps/overlays if done by subtract 0
precision: 9
absx060 abs '-56267E-10' -> '0.0000056267'
absx061 abs '-56267E-5' -> '0.56267'
absx062 abs '-56267E-2' -> '562.67'
absx063 abs '-56267E-1' -> '5626.7'
absx065 abs '-56267E-0' -> '56267'
-- overflow tests
maxexponent: 999999999
minexponent: -999999999
precision: 3
absx120 abs 9.999E+999999999 -> Infinity Inexact Overflow Rounded
-- subnormals and underflow
precision: 3
maxexponent: 999
minexponent: -999
absx210 abs 1.00E-999 -> 1.00E-999
absx211 abs 0.1E-999 -> 1E-1000 Subnormal
absx212 abs 0.10E-999 -> 1.0E-1000 Subnormal
absx213 abs 0.100E-999 -> 1.0E-1000 Subnormal Rounded
absx214 abs 0.01E-999 -> 1E-1001 Subnormal
-- next is rounded to Emin
absx215 abs 0.999E-999 -> 1.00E-999 Inexact Rounded Subnormal Underflow
absx216 abs 0.099E-999 -> 1.0E-1000 Inexact Rounded Subnormal Underflow
absx217 abs 0.009E-999 -> 1E-1001 Inexact Rounded Subnormal Underflow
absx218 abs 0.001E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
absx219 abs 0.0009E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
absx220 abs 0.0001E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
absx230 abs -1.00E-999 -> 1.00E-999
absx231 abs -0.1E-999 -> 1E-1000 Subnormal
absx232 abs -0.10E-999 -> 1.0E-1000 Subnormal
absx233 abs -0.100E-999 -> 1.0E-1000 Subnormal Rounded
absx234 abs -0.01E-999 -> 1E-1001 Subnormal
-- next is rounded to Emin
absx235 abs -0.999E-999 -> 1.00E-999 Inexact Rounded Subnormal Underflow
absx236 abs -0.099E-999 -> 1.0E-1000 Inexact Rounded Subnormal Underflow
absx237 abs -0.009E-999 -> 1E-1001 Inexact Rounded Subnormal Underflow
absx238 abs -0.001E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
absx239 abs -0.0009E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
absx240 abs -0.0001E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
-- long operand tests
maxexponent: 999
minexponent: -999
precision: 9
absx301 abs 12345678000 -> 1.23456780E+10 Rounded
absx302 abs 1234567800 -> 1.23456780E+9 Rounded
absx303 abs 1234567890 -> 1.23456789E+9 Rounded
absx304 abs 1234567891 -> 1.23456789E+9 Inexact Rounded
absx305 abs 12345678901 -> 1.23456789E+10 Inexact Rounded
absx306 abs 1234567896 -> 1.23456790E+9 Inexact Rounded
precision: 15
absx321 abs 12345678000 -> 12345678000
absx322 abs 1234567800 -> 1234567800
absx323 abs 1234567890 -> 1234567890
absx324 abs 1234567891 -> 1234567891
absx325 abs 12345678901 -> 12345678901
absx326 abs 1234567896 -> 1234567896
-- Specials
precision: 9
-- specials
absx520 abs 'Inf' -> 'Infinity'
absx521 abs '-Inf' -> 'Infinity'
absx522 abs NaN -> NaN
absx523 abs sNaN -> NaN Invalid_operation
absx524 abs NaN22 -> NaN22
absx525 abs sNaN33 -> NaN33 Invalid_operation
absx526 abs -NaN22 -> -NaN22
absx527 abs -sNaN33 -> -NaN33 Invalid_operation
-- Null tests
absx900 abs # -> NaN Invalid_operation

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,338 @@
------------------------------------------------------------------------
-- and.decTest -- digitwise logical AND --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
extended: 1
precision: 9
rounding: half_up
maxExponent: 999
minExponent: -999
-- Sanity check (truth table)
andx001 and 0 0 -> 0
andx002 and 0 1 -> 0
andx003 and 1 0 -> 0
andx004 and 1 1 -> 1
andx005 and 1100 1010 -> 1000
andx006 and 1111 10 -> 10
andx007 and 1111 1010 -> 1010
-- and at msd and msd-1
andx010 and 000000000 000000000 -> 0
andx011 and 000000000 100000000 -> 0
andx012 and 100000000 000000000 -> 0
andx013 and 100000000 100000000 -> 100000000
andx014 and 000000000 000000000 -> 0
andx015 and 000000000 010000000 -> 0
andx016 and 010000000 000000000 -> 0
andx017 and 010000000 010000000 -> 10000000
-- Various lengths
-- 123456789 123456789 123456789
andx021 and 111111111 111111111 -> 111111111
andx022 and 111111111111 111111111 -> 111111111
andx023 and 111111111111 11111111 -> 11111111
andx024 and 111111111 11111111 -> 11111111
andx025 and 111111111 1111111 -> 1111111
andx026 and 111111111111 111111 -> 111111
andx027 and 111111111111 11111 -> 11111
andx028 and 111111111111 1111 -> 1111
andx029 and 111111111111 111 -> 111
andx031 and 111111111111 11 -> 11
andx032 and 111111111111 1 -> 1
andx033 and 111111111111 1111111111 -> 111111111
andx034 and 11111111111 11111111111 -> 111111111
andx035 and 1111111111 111111111111 -> 111111111
andx036 and 111111111 1111111111111 -> 111111111
andx040 and 111111111 111111111111 -> 111111111
andx041 and 11111111 111111111111 -> 11111111
andx042 and 11111111 111111111 -> 11111111
andx043 and 1111111 111111111 -> 1111111
andx044 and 111111 111111111 -> 111111
andx045 and 11111 111111111 -> 11111
andx046 and 1111 111111111 -> 1111
andx047 and 111 111111111 -> 111
andx048 and 11 111111111 -> 11
andx049 and 1 111111111 -> 1
andx050 and 1111111111 1 -> 1
andx051 and 111111111 1 -> 1
andx052 and 11111111 1 -> 1
andx053 and 1111111 1 -> 1
andx054 and 111111 1 -> 1
andx055 and 11111 1 -> 1
andx056 and 1111 1 -> 1
andx057 and 111 1 -> 1
andx058 and 11 1 -> 1
andx059 and 1 1 -> 1
andx060 and 1111111111 0 -> 0
andx061 and 111111111 0 -> 0
andx062 and 11111111 0 -> 0
andx063 and 1111111 0 -> 0
andx064 and 111111 0 -> 0
andx065 and 11111 0 -> 0
andx066 and 1111 0 -> 0
andx067 and 111 0 -> 0
andx068 and 11 0 -> 0
andx069 and 1 0 -> 0
andx070 and 1 1111111111 -> 1
andx071 and 1 111111111 -> 1
andx072 and 1 11111111 -> 1
andx073 and 1 1111111 -> 1
andx074 and 1 111111 -> 1
andx075 and 1 11111 -> 1
andx076 and 1 1111 -> 1
andx077 and 1 111 -> 1
andx078 and 1 11 -> 1
andx079 and 1 1 -> 1
andx080 and 0 1111111111 -> 0
andx081 and 0 111111111 -> 0
andx082 and 0 11111111 -> 0
andx083 and 0 1111111 -> 0
andx084 and 0 111111 -> 0
andx085 and 0 11111 -> 0
andx086 and 0 1111 -> 0
andx087 and 0 111 -> 0
andx088 and 0 11 -> 0
andx089 and 0 1 -> 0
andx090 and 011111111 111111111 -> 11111111
andx091 and 101111111 111111111 -> 101111111
andx092 and 110111111 111111111 -> 110111111
andx093 and 111011111 111111111 -> 111011111
andx094 and 111101111 111111111 -> 111101111
andx095 and 111110111 111111111 -> 111110111
andx096 and 111111011 111111111 -> 111111011
andx097 and 111111101 111111111 -> 111111101
andx098 and 111111110 111111111 -> 111111110
andx100 and 111111111 011111111 -> 11111111
andx101 and 111111111 101111111 -> 101111111
andx102 and 111111111 110111111 -> 110111111
andx103 and 111111111 111011111 -> 111011111
andx104 and 111111111 111101111 -> 111101111
andx105 and 111111111 111110111 -> 111110111
andx106 and 111111111 111111011 -> 111111011
andx107 and 111111111 111111101 -> 111111101
andx108 and 111111111 111111110 -> 111111110
-- non-0/1 should not be accepted, nor should signs
andx220 and 111111112 111111111 -> NaN Invalid_operation
andx221 and 333333333 333333333 -> NaN Invalid_operation
andx222 and 555555555 555555555 -> NaN Invalid_operation
andx223 and 777777777 777777777 -> NaN Invalid_operation
andx224 and 999999999 999999999 -> NaN Invalid_operation
andx225 and 222222222 999999999 -> NaN Invalid_operation
andx226 and 444444444 999999999 -> NaN Invalid_operation
andx227 and 666666666 999999999 -> NaN Invalid_operation
andx228 and 888888888 999999999 -> NaN Invalid_operation
andx229 and 999999999 222222222 -> NaN Invalid_operation
andx230 and 999999999 444444444 -> NaN Invalid_operation
andx231 and 999999999 666666666 -> NaN Invalid_operation
andx232 and 999999999 888888888 -> NaN Invalid_operation
-- a few randoms
andx240 and 567468689 -934981942 -> NaN Invalid_operation
andx241 and 567367689 934981942 -> NaN Invalid_operation
andx242 and -631917772 -706014634 -> NaN Invalid_operation
andx243 and -756253257 138579234 -> NaN Invalid_operation
andx244 and 835590149 567435400 -> NaN Invalid_operation
-- test MSD
andx250 and 200000000 100000000 -> NaN Invalid_operation
andx251 and 700000000 100000000 -> NaN Invalid_operation
andx252 and 800000000 100000000 -> NaN Invalid_operation
andx253 and 900000000 100000000 -> NaN Invalid_operation
andx254 and 200000000 000000000 -> NaN Invalid_operation
andx255 and 700000000 000000000 -> NaN Invalid_operation
andx256 and 800000000 000000000 -> NaN Invalid_operation
andx257 and 900000000 000000000 -> NaN Invalid_operation
andx258 and 100000000 200000000 -> NaN Invalid_operation
andx259 and 100000000 700000000 -> NaN Invalid_operation
andx260 and 100000000 800000000 -> NaN Invalid_operation
andx261 and 100000000 900000000 -> NaN Invalid_operation
andx262 and 000000000 200000000 -> NaN Invalid_operation
andx263 and 000000000 700000000 -> NaN Invalid_operation
andx264 and 000000000 800000000 -> NaN Invalid_operation
andx265 and 000000000 900000000 -> NaN Invalid_operation
-- test MSD-1
andx270 and 020000000 100000000 -> NaN Invalid_operation
andx271 and 070100000 100000000 -> NaN Invalid_operation
andx272 and 080010000 100000001 -> NaN Invalid_operation
andx273 and 090001000 100000010 -> NaN Invalid_operation
andx274 and 100000100 020010100 -> NaN Invalid_operation
andx275 and 100000000 070001000 -> NaN Invalid_operation
andx276 and 100000010 080010100 -> NaN Invalid_operation
andx277 and 100000000 090000010 -> NaN Invalid_operation
-- test LSD
andx280 and 001000002 100000000 -> NaN Invalid_operation
andx281 and 000000007 100000000 -> NaN Invalid_operation
andx282 and 000000008 100000000 -> NaN Invalid_operation
andx283 and 000000009 100000000 -> NaN Invalid_operation
andx284 and 100000000 000100002 -> NaN Invalid_operation
andx285 and 100100000 001000007 -> NaN Invalid_operation
andx286 and 100010000 010000008 -> NaN Invalid_operation
andx287 and 100001000 100000009 -> NaN Invalid_operation
-- test Middie
andx288 and 001020000 100000000 -> NaN Invalid_operation
andx289 and 000070001 100000000 -> NaN Invalid_operation
andx290 and 000080000 100010000 -> NaN Invalid_operation
andx291 and 000090000 100001000 -> NaN Invalid_operation
andx292 and 100000010 000020100 -> NaN Invalid_operation
andx293 and 100100000 000070010 -> NaN Invalid_operation
andx294 and 100010100 000080001 -> NaN Invalid_operation
andx295 and 100001000 000090000 -> NaN Invalid_operation
-- signs
andx296 and -100001000 -000000000 -> NaN Invalid_operation
andx297 and -100001000 000010000 -> NaN Invalid_operation
andx298 and 100001000 -000000000 -> NaN Invalid_operation
andx299 and 100001000 000011000 -> 1000
-- Nmax, Nmin, Ntiny
andx331 and 2 9.99999999E+999 -> NaN Invalid_operation
andx332 and 3 1E-999 -> NaN Invalid_operation
andx333 and 4 1.00000000E-999 -> NaN Invalid_operation
andx334 and 5 1E-1007 -> NaN Invalid_operation
andx335 and 6 -1E-1007 -> NaN Invalid_operation
andx336 and 7 -1.00000000E-999 -> NaN Invalid_operation
andx337 and 8 -1E-999 -> NaN Invalid_operation
andx338 and 9 -9.99999999E+999 -> NaN Invalid_operation
andx341 and 9.99999999E+999 -18 -> NaN Invalid_operation
andx342 and 1E-999 01 -> NaN Invalid_operation
andx343 and 1.00000000E-999 -18 -> NaN Invalid_operation
andx344 and 1E-1007 18 -> NaN Invalid_operation
andx345 and -1E-1007 -10 -> NaN Invalid_operation
andx346 and -1.00000000E-999 18 -> NaN Invalid_operation
andx347 and -1E-999 10 -> NaN Invalid_operation
andx348 and -9.99999999E+999 -18 -> NaN Invalid_operation
-- A few other non-integers
andx361 and 1.0 1 -> NaN Invalid_operation
andx362 and 1E+1 1 -> NaN Invalid_operation
andx363 and 0.0 1 -> NaN Invalid_operation
andx364 and 0E+1 1 -> NaN Invalid_operation
andx365 and 9.9 1 -> NaN Invalid_operation
andx366 and 9E+1 1 -> NaN Invalid_operation
andx371 and 0 1.0 -> NaN Invalid_operation
andx372 and 0 1E+1 -> NaN Invalid_operation
andx373 and 0 0.0 -> NaN Invalid_operation
andx374 and 0 0E+1 -> NaN Invalid_operation
andx375 and 0 9.9 -> NaN Invalid_operation
andx376 and 0 9E+1 -> NaN Invalid_operation
-- All Specials are in error
andx780 and -Inf -Inf -> NaN Invalid_operation
andx781 and -Inf -1000 -> NaN Invalid_operation
andx782 and -Inf -1 -> NaN Invalid_operation
andx783 and -Inf -0 -> NaN Invalid_operation
andx784 and -Inf 0 -> NaN Invalid_operation
andx785 and -Inf 1 -> NaN Invalid_operation
andx786 and -Inf 1000 -> NaN Invalid_operation
andx787 and -1000 -Inf -> NaN Invalid_operation
andx788 and -Inf -Inf -> NaN Invalid_operation
andx789 and -1 -Inf -> NaN Invalid_operation
andx790 and -0 -Inf -> NaN Invalid_operation
andx791 and 0 -Inf -> NaN Invalid_operation
andx792 and 1 -Inf -> NaN Invalid_operation
andx793 and 1000 -Inf -> NaN Invalid_operation
andx794 and Inf -Inf -> NaN Invalid_operation
andx800 and Inf -Inf -> NaN Invalid_operation
andx801 and Inf -1000 -> NaN Invalid_operation
andx802 and Inf -1 -> NaN Invalid_operation
andx803 and Inf -0 -> NaN Invalid_operation
andx804 and Inf 0 -> NaN Invalid_operation
andx805 and Inf 1 -> NaN Invalid_operation
andx806 and Inf 1000 -> NaN Invalid_operation
andx807 and Inf Inf -> NaN Invalid_operation
andx808 and -1000 Inf -> NaN Invalid_operation
andx809 and -Inf Inf -> NaN Invalid_operation
andx810 and -1 Inf -> NaN Invalid_operation
andx811 and -0 Inf -> NaN Invalid_operation
andx812 and 0 Inf -> NaN Invalid_operation
andx813 and 1 Inf -> NaN Invalid_operation
andx814 and 1000 Inf -> NaN Invalid_operation
andx815 and Inf Inf -> NaN Invalid_operation
andx821 and NaN -Inf -> NaN Invalid_operation
andx822 and NaN -1000 -> NaN Invalid_operation
andx823 and NaN -1 -> NaN Invalid_operation
andx824 and NaN -0 -> NaN Invalid_operation
andx825 and NaN 0 -> NaN Invalid_operation
andx826 and NaN 1 -> NaN Invalid_operation
andx827 and NaN 1000 -> NaN Invalid_operation
andx828 and NaN Inf -> NaN Invalid_operation
andx829 and NaN NaN -> NaN Invalid_operation
andx830 and -Inf NaN -> NaN Invalid_operation
andx831 and -1000 NaN -> NaN Invalid_operation
andx832 and -1 NaN -> NaN Invalid_operation
andx833 and -0 NaN -> NaN Invalid_operation
andx834 and 0 NaN -> NaN Invalid_operation
andx835 and 1 NaN -> NaN Invalid_operation
andx836 and 1000 NaN -> NaN Invalid_operation
andx837 and Inf NaN -> NaN Invalid_operation
andx841 and sNaN -Inf -> NaN Invalid_operation
andx842 and sNaN -1000 -> NaN Invalid_operation
andx843 and sNaN -1 -> NaN Invalid_operation
andx844 and sNaN -0 -> NaN Invalid_operation
andx845 and sNaN 0 -> NaN Invalid_operation
andx846 and sNaN 1 -> NaN Invalid_operation
andx847 and sNaN 1000 -> NaN Invalid_operation
andx848 and sNaN NaN -> NaN Invalid_operation
andx849 and sNaN sNaN -> NaN Invalid_operation
andx850 and NaN sNaN -> NaN Invalid_operation
andx851 and -Inf sNaN -> NaN Invalid_operation
andx852 and -1000 sNaN -> NaN Invalid_operation
andx853 and -1 sNaN -> NaN Invalid_operation
andx854 and -0 sNaN -> NaN Invalid_operation
andx855 and 0 sNaN -> NaN Invalid_operation
andx856 and 1 sNaN -> NaN Invalid_operation
andx857 and 1000 sNaN -> NaN Invalid_operation
andx858 and Inf sNaN -> NaN Invalid_operation
andx859 and NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
andx861 and NaN1 -Inf -> NaN Invalid_operation
andx862 and +NaN2 -1000 -> NaN Invalid_operation
andx863 and NaN3 1000 -> NaN Invalid_operation
andx864 and NaN4 Inf -> NaN Invalid_operation
andx865 and NaN5 +NaN6 -> NaN Invalid_operation
andx866 and -Inf NaN7 -> NaN Invalid_operation
andx867 and -1000 NaN8 -> NaN Invalid_operation
andx868 and 1000 NaN9 -> NaN Invalid_operation
andx869 and Inf +NaN10 -> NaN Invalid_operation
andx871 and sNaN11 -Inf -> NaN Invalid_operation
andx872 and sNaN12 -1000 -> NaN Invalid_operation
andx873 and sNaN13 1000 -> NaN Invalid_operation
andx874 and sNaN14 NaN17 -> NaN Invalid_operation
andx875 and sNaN15 sNaN18 -> NaN Invalid_operation
andx876 and NaN16 sNaN19 -> NaN Invalid_operation
andx877 and -Inf +sNaN20 -> NaN Invalid_operation
andx878 and -1000 sNaN21 -> NaN Invalid_operation
andx879 and 1000 sNaN22 -> NaN Invalid_operation
andx880 and Inf sNaN23 -> NaN Invalid_operation
andx881 and +NaN25 +sNaN24 -> NaN Invalid_operation
andx882 and -NaN26 NaN28 -> NaN Invalid_operation
andx883 and -sNaN27 sNaN29 -> NaN Invalid_operation
andx884 and 1000 -NaN30 -> NaN Invalid_operation
andx885 and 1000 -sNaN31 -> NaN Invalid_operation

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,211 @@
------------------------------------------------------------------------
-- clamp.decTest -- clamped exponent tests (format-independent) --
-- Copyright (c) IBM Corporation, 2000, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- This set of tests uses the same limits as the 8-byte concrete
-- representation, but applies clamping without using format-specific
-- conversions.
extended: 1
precision: 16
rounding: half_even
maxExponent: 384
minExponent: -383
clamp: 1
-- General testcases
-- Normality
clam010 apply 1234567890123456 -> 1234567890123456
clam011 apply 1234567890123456.0 -> 1234567890123456 Rounded
clam012 apply 1234567890123456.1 -> 1234567890123456 Rounded Inexact
clam013 apply -1234567890123456 -> -1234567890123456
clam014 apply -1234567890123456.0 -> -1234567890123456 Rounded
clam015 apply -1234567890123456.1 -> -1234567890123456 Rounded Inexact
-- Nmax and similar
clam022 apply 9.999999999999999E+384 -> 9.999999999999999E+384
clam024 apply 1.234567890123456E+384 -> 1.234567890123456E+384
-- fold-downs (more below)
clam030 apply 1.23E+384 -> 1.230000000000000E+384 Clamped
clam032 apply 1E+384 -> 1.000000000000000E+384 Clamped
clam051 apply 12345 -> 12345
clam053 apply 1234 -> 1234
clam055 apply 123 -> 123
clam057 apply 12 -> 12
clam059 apply 1 -> 1
clam061 apply 1.23 -> 1.23
clam063 apply 123.45 -> 123.45
-- Nmin and below
clam071 apply 1E-383 -> 1E-383
clam073 apply 1.000000000000000E-383 -> 1.000000000000000E-383
clam075 apply 1.000000000000001E-383 -> 1.000000000000001E-383
clam077 apply 0.100000000000000E-383 -> 1.00000000000000E-384 Subnormal
clam079 apply 0.000000000000010E-383 -> 1.0E-397 Subnormal
clam081 apply 0.00000000000001E-383 -> 1E-397 Subnormal
clam083 apply 0.000000000000001E-383 -> 1E-398 Subnormal
-- underflows
clam090 apply 1e-398 -> #0000000000000001 Subnormal
clam091 apply 1.9e-398 -> #0000000000000002 Subnormal Underflow Inexact Rounded
clam092 apply 1.1e-398 -> #0000000000000001 Subnormal Underflow Inexact Rounded
clam093 apply 1.00000000001e-398 -> #0000000000000001 Subnormal Underflow Inexact Rounded
clam094 apply 1.00000000000001e-398 -> #0000000000000001 Subnormal Underflow Inexact Rounded
clam095 apply 1.000000000000001e-398 -> #0000000000000001 Subnormal Underflow Inexact Rounded
clam096 apply 0.1e-398 -> #0000000000000000 Subnormal Underflow Inexact Rounded Clamped
clam097 apply 0.00000000001e-398 -> #0000000000000000 Subnormal Underflow Inexact Rounded Clamped
clam098 apply 0.00000000000001e-398 -> #0000000000000000 Subnormal Underflow Inexact Rounded Clamped
clam099 apply 0.000000000000001e-398 -> #0000000000000000 Subnormal Underflow Inexact Rounded Clamped
-- Same again, negatives
-- Nmax and similar
clam122 apply -9.999999999999999E+384 -> -9.999999999999999E+384
clam124 apply -1.234567890123456E+384 -> -1.234567890123456E+384
-- fold-downs (more below)
clam130 apply -1.23E+384 -> -1.230000000000000E+384 Clamped
clam132 apply -1E+384 -> -1.000000000000000E+384 Clamped
clam151 apply -12345 -> -12345
clam153 apply -1234 -> -1234
clam155 apply -123 -> -123
clam157 apply -12 -> -12
clam159 apply -1 -> -1
clam161 apply -1.23 -> -1.23
clam163 apply -123.45 -> -123.45
-- Nmin and below
clam171 apply -1E-383 -> -1E-383
clam173 apply -1.000000000000000E-383 -> -1.000000000000000E-383
clam175 apply -1.000000000000001E-383 -> -1.000000000000001E-383
clam177 apply -0.100000000000000E-383 -> -1.00000000000000E-384 Subnormal
clam179 apply -0.000000000000010E-383 -> -1.0E-397 Subnormal
clam181 apply -0.00000000000001E-383 -> -1E-397 Subnormal
clam183 apply -0.000000000000001E-383 -> -1E-398 Subnormal
-- underflows
clam189 apply -1e-398 -> #8000000000000001 Subnormal
clam190 apply -1.0e-398 -> #8000000000000001 Subnormal Rounded
clam191 apply -1.9e-398 -> #8000000000000002 Subnormal Underflow Inexact Rounded
clam192 apply -1.1e-398 -> #8000000000000001 Subnormal Underflow Inexact Rounded
clam193 apply -1.00000000001e-398 -> #8000000000000001 Subnormal Underflow Inexact Rounded
clam194 apply -1.00000000000001e-398 -> #8000000000000001 Subnormal Underflow Inexact Rounded
clam195 apply -1.000000000000001e-398 -> #8000000000000001 Subnormal Underflow Inexact Rounded
clam196 apply -0.1e-398 -> #8000000000000000 Subnormal Underflow Inexact Rounded Clamped
clam197 apply -0.00000000001e-398 -> #8000000000000000 Subnormal Underflow Inexact Rounded Clamped
clam198 apply -0.00000000000001e-398 -> #8000000000000000 Subnormal Underflow Inexact Rounded Clamped
clam199 apply -0.000000000000001e-398 -> #8000000000000000 Subnormal Underflow Inexact Rounded Clamped
-- zeros
clam401 apply 0E-500 -> 0E-398 Clamped
clam402 apply 0E-400 -> 0E-398 Clamped
clam403 apply 0E-398 -> 0E-398
clam404 apply 0.000000000000000E-383 -> 0E-398
clam405 apply 0E-2 -> 0.00
clam406 apply 0 -> 0
clam407 apply 0E+3 -> 0E+3
clam408 apply 0E+369 -> 0E+369
-- clamped zeros...
clam410 apply 0E+370 -> 0E+369 Clamped
clam411 apply 0E+384 -> 0E+369 Clamped
clam412 apply 0E+400 -> 0E+369 Clamped
clam413 apply 0E+500 -> 0E+369 Clamped
-- negative zeros
clam420 apply -0E-500 -> -0E-398 Clamped
clam421 apply -0E-400 -> -0E-398 Clamped
clam422 apply -0E-398 -> -0E-398
clam423 apply -0.000000000000000E-383 -> -0E-398
clam424 apply -0E-2 -> -0.00
clam425 apply -0 -> -0
clam426 apply -0E+3 -> -0E+3
clam427 apply -0E+369 -> -0E+369
-- clamped zeros...
clam431 apply -0E+370 -> -0E+369 Clamped
clam432 apply -0E+384 -> -0E+369 Clamped
clam433 apply -0E+400 -> -0E+369 Clamped
clam434 apply -0E+500 -> -0E+369 Clamped
-- fold-down full sequence
clam601 apply 1E+384 -> 1.000000000000000E+384 Clamped
clam603 apply 1E+383 -> 1.00000000000000E+383 Clamped
clam605 apply 1E+382 -> 1.0000000000000E+382 Clamped
clam607 apply 1E+381 -> 1.000000000000E+381 Clamped
clam609 apply 1E+380 -> 1.00000000000E+380 Clamped
clam611 apply 1E+379 -> 1.0000000000E+379 Clamped
clam613 apply 1E+378 -> 1.000000000E+378 Clamped
clam615 apply 1E+377 -> 1.00000000E+377 Clamped
clam617 apply 1E+376 -> 1.0000000E+376 Clamped
clam619 apply 1E+375 -> 1.000000E+375 Clamped
clam621 apply 1E+374 -> 1.00000E+374 Clamped
clam623 apply 1E+373 -> 1.0000E+373 Clamped
clam625 apply 1E+372 -> 1.000E+372 Clamped
clam627 apply 1E+371 -> 1.00E+371 Clamped
clam629 apply 1E+370 -> 1.0E+370 Clamped
clam631 apply 1E+369 -> 1E+369
clam633 apply 1E+368 -> 1E+368
-- same with 9s
clam641 apply 9E+384 -> 9.000000000000000E+384 Clamped
clam643 apply 9E+383 -> 9.00000000000000E+383 Clamped
clam645 apply 9E+382 -> 9.0000000000000E+382 Clamped
clam647 apply 9E+381 -> 9.000000000000E+381 Clamped
clam649 apply 9E+380 -> 9.00000000000E+380 Clamped
clam651 apply 9E+379 -> 9.0000000000E+379 Clamped
clam653 apply 9E+378 -> 9.000000000E+378 Clamped
clam655 apply 9E+377 -> 9.00000000E+377 Clamped
clam657 apply 9E+376 -> 9.0000000E+376 Clamped
clam659 apply 9E+375 -> 9.000000E+375 Clamped
clam661 apply 9E+374 -> 9.00000E+374 Clamped
clam663 apply 9E+373 -> 9.0000E+373 Clamped
clam665 apply 9E+372 -> 9.000E+372 Clamped
clam667 apply 9E+371 -> 9.00E+371 Clamped
clam669 apply 9E+370 -> 9.0E+370 Clamped
clam671 apply 9E+369 -> 9E+369
clam673 apply 9E+368 -> 9E+368
-- subnormals clamped to 0-Etiny
precision: 16
maxExponent: 384
minExponent: -383
clam681 apply 7E-398 -> 7E-398 Subnormal
clam682 apply 0E-398 -> 0E-398
clam683 apply 7E-399 -> 1E-398 Subnormal Underflow Inexact Rounded
clam684 apply 4E-399 -> 0E-398 Clamped Subnormal Underflow Inexact Rounded
clam685 apply 7E-400 -> 0E-398 Clamped Subnormal Underflow Inexact Rounded
clam686 apply 7E-401 -> 0E-398 Clamped Subnormal Underflow Inexact Rounded
clam687 apply 0E-399 -> 0E-398 Clamped
clam688 apply 0E-400 -> 0E-398 Clamped
clam689 apply 0E-401 -> 0E-398 Clamped
-- example from documentation
precision: 7
rounding: half_even
maxExponent: +96
minExponent: -95
clamp: 0
clam700 apply 1.23E+96 -> 1.23E+96
clamp: 1
clam701 apply 1.23E+96 -> 1.230000E+96 Clamped

View file

@ -0,0 +1,131 @@
------------------------------------------------------------------------
-- class.decTest -- Class operations --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- [New 2006.11.27]
precision: 9
maxExponent: 999
minExponent: -999
extended: 1
clamp: 1
rounding: half_even
clasx001 class 0 -> +Zero
clasx002 class 0.00 -> +Zero
clasx003 class 0E+5 -> +Zero
clasx004 class 1E-1007 -> +Subnormal
clasx005 class 0.1E-999 -> +Subnormal
clasx006 class 0.99999999E-999 -> +Subnormal
clasx007 class 1.00000000E-999 -> +Normal
clasx008 class 1E-999 -> +Normal
clasx009 class 1E-100 -> +Normal
clasx010 class 1E-10 -> +Normal
clasx012 class 1E-1 -> +Normal
clasx013 class 1 -> +Normal
clasx014 class 2.50 -> +Normal
clasx015 class 100.100 -> +Normal
clasx016 class 1E+30 -> +Normal
clasx017 class 1E+999 -> +Normal
clasx018 class 9.99999999E+999 -> +Normal
clasx019 class Inf -> +Infinity
clasx021 class -0 -> -Zero
clasx022 class -0.00 -> -Zero
clasx023 class -0E+5 -> -Zero
clasx024 class -1E-1007 -> -Subnormal
clasx025 class -0.1E-999 -> -Subnormal
clasx026 class -0.99999999E-999 -> -Subnormal
clasx027 class -1.00000000E-999 -> -Normal
clasx028 class -1E-999 -> -Normal
clasx029 class -1E-100 -> -Normal
clasx030 class -1E-10 -> -Normal
clasx032 class -1E-1 -> -Normal
clasx033 class -1 -> -Normal
clasx034 class -2.50 -> -Normal
clasx035 class -100.100 -> -Normal
clasx036 class -1E+30 -> -Normal
clasx037 class -1E+999 -> -Normal
clasx038 class -9.99999999E+999 -> -Normal
clasx039 class -Inf -> -Infinity
clasx041 class NaN -> NaN
clasx042 class -NaN -> NaN
clasx043 class +NaN12345 -> NaN
clasx044 class sNaN -> sNaN
clasx045 class -sNaN -> sNaN
clasx046 class +sNaN12345 -> sNaN
-- decimal64 bounds
precision: 16
maxExponent: 384
minExponent: -383
clamp: 1
rounding: half_even
clasx201 class 0 -> +Zero
clasx202 class 0.00 -> +Zero
clasx203 class 0E+5 -> +Zero
clasx204 class 1E-396 -> +Subnormal
clasx205 class 0.1E-383 -> +Subnormal
clasx206 class 0.999999999999999E-383 -> +Subnormal
clasx207 class 1.000000000000000E-383 -> +Normal
clasx208 class 1E-383 -> +Normal
clasx209 class 1E-100 -> +Normal
clasx210 class 1E-10 -> +Normal
clasx212 class 1E-1 -> +Normal
clasx213 class 1 -> +Normal
clasx214 class 2.50 -> +Normal
clasx215 class 100.100 -> +Normal
clasx216 class 1E+30 -> +Normal
clasx217 class 1E+384 -> +Normal
clasx218 class 9.999999999999999E+384 -> +Normal
clasx219 class Inf -> +Infinity
clasx221 class -0 -> -Zero
clasx222 class -0.00 -> -Zero
clasx223 class -0E+5 -> -Zero
clasx224 class -1E-396 -> -Subnormal
clasx225 class -0.1E-383 -> -Subnormal
clasx226 class -0.999999999999999E-383 -> -Subnormal
clasx227 class -1.000000000000000E-383 -> -Normal
clasx228 class -1E-383 -> -Normal
clasx229 class -1E-100 -> -Normal
clasx230 class -1E-10 -> -Normal
clasx232 class -1E-1 -> -Normal
clasx233 class -1 -> -Normal
clasx234 class -2.50 -> -Normal
clasx235 class -100.100 -> -Normal
clasx236 class -1E+30 -> -Normal
clasx237 class -1E+384 -> -Normal
clasx238 class -9.999999999999999E+384 -> -Normal
clasx239 class -Inf -> -Infinity
clasx241 class NaN -> NaN
clasx242 class -NaN -> NaN
clasx243 class +NaN12345 -> NaN
clasx244 class sNaN -> sNaN
clasx245 class -sNaN -> sNaN
clasx246 class +sNaN12345 -> sNaN

View file

@ -0,0 +1,758 @@
------------------------------------------------------------------------
-- compare.decTest -- decimal comparison that allows quiet NaNs --
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.59
-- Note that we cannot assume add/subtract tests cover paths adequately,
-- here, because the code might be quite different (comparison cannot
-- overflow or underflow, so actual subtractions are not necessary).
extended: 1
precision: 9
rounding: half_up
maxExponent: 999
minexponent: -999
-- sanity checks
comx001 compare -2 -2 -> 0
comx002 compare -2 -1 -> -1
comx003 compare -2 0 -> -1
comx004 compare -2 1 -> -1
comx005 compare -2 2 -> -1
comx006 compare -1 -2 -> 1
comx007 compare -1 -1 -> 0
comx008 compare -1 0 -> -1
comx009 compare -1 1 -> -1
comx010 compare -1 2 -> -1
comx011 compare 0 -2 -> 1
comx012 compare 0 -1 -> 1
comx013 compare 0 0 -> 0
comx014 compare 0 1 -> -1
comx015 compare 0 2 -> -1
comx016 compare 1 -2 -> 1
comx017 compare 1 -1 -> 1
comx018 compare 1 0 -> 1
comx019 compare 1 1 -> 0
comx020 compare 1 2 -> -1
comx021 compare 2 -2 -> 1
comx022 compare 2 -1 -> 1
comx023 compare 2 0 -> 1
comx025 compare 2 1 -> 1
comx026 compare 2 2 -> 0
comx031 compare -20 -20 -> 0
comx032 compare -20 -10 -> -1
comx033 compare -20 00 -> -1
comx034 compare -20 10 -> -1
comx035 compare -20 20 -> -1
comx036 compare -10 -20 -> 1
comx037 compare -10 -10 -> 0
comx038 compare -10 00 -> -1
comx039 compare -10 10 -> -1
comx040 compare -10 20 -> -1
comx041 compare 00 -20 -> 1
comx042 compare 00 -10 -> 1
comx043 compare 00 00 -> 0
comx044 compare 00 10 -> -1
comx045 compare 00 20 -> -1
comx046 compare 10 -20 -> 1
comx047 compare 10 -10 -> 1
comx048 compare 10 00 -> 1
comx049 compare 10 10 -> 0
comx050 compare 10 20 -> -1
comx051 compare 20 -20 -> 1
comx052 compare 20 -10 -> 1
comx053 compare 20 00 -> 1
comx055 compare 20 10 -> 1
comx056 compare 20 20 -> 0
comx061 compare -2.0 -2.0 -> 0
comx062 compare -2.0 -1.0 -> -1
comx063 compare -2.0 0.0 -> -1
comx064 compare -2.0 1.0 -> -1
comx065 compare -2.0 2.0 -> -1
comx066 compare -1.0 -2.0 -> 1
comx067 compare -1.0 -1.0 -> 0
comx068 compare -1.0 0.0 -> -1
comx069 compare -1.0 1.0 -> -1
comx070 compare -1.0 2.0 -> -1
comx071 compare 0.0 -2.0 -> 1
comx072 compare 0.0 -1.0 -> 1
comx073 compare 0.0 0.0 -> 0
comx074 compare 0.0 1.0 -> -1
comx075 compare 0.0 2.0 -> -1
comx076 compare 1.0 -2.0 -> 1
comx077 compare 1.0 -1.0 -> 1
comx078 compare 1.0 0.0 -> 1
comx079 compare 1.0 1.0 -> 0
comx080 compare 1.0 2.0 -> -1
comx081 compare 2.0 -2.0 -> 1
comx082 compare 2.0 -1.0 -> 1
comx083 compare 2.0 0.0 -> 1
comx085 compare 2.0 1.0 -> 1
comx086 compare 2.0 2.0 -> 0
-- now some cases which might overflow if subtract were used
maxexponent: 999999999
minexponent: -999999999
comx095 compare 9.99999999E+999999999 9.99999999E+999999999 -> 0
comx096 compare -9.99999999E+999999999 9.99999999E+999999999 -> -1
comx097 compare 9.99999999E+999999999 -9.99999999E+999999999 -> 1
comx098 compare -9.99999999E+999999999 -9.99999999E+999999999 -> 0
-- some differing length/exponent cases
comx100 compare 7.0 7.0 -> 0
comx101 compare 7.0 7 -> 0
comx102 compare 7 7.0 -> 0
comx103 compare 7E+0 7.0 -> 0
comx104 compare 70E-1 7.0 -> 0
comx105 compare 0.7E+1 7 -> 0
comx106 compare 70E-1 7 -> 0
comx107 compare 7.0 7E+0 -> 0
comx108 compare 7.0 70E-1 -> 0
comx109 compare 7 0.7E+1 -> 0
comx110 compare 7 70E-1 -> 0
comx120 compare 8.0 7.0 -> 1
comx121 compare 8.0 7 -> 1
comx122 compare 8 7.0 -> 1
comx123 compare 8E+0 7.0 -> 1
comx124 compare 80E-1 7.0 -> 1
comx125 compare 0.8E+1 7 -> 1
comx126 compare 80E-1 7 -> 1
comx127 compare 8.0 7E+0 -> 1
comx128 compare 8.0 70E-1 -> 1
comx129 compare 8 0.7E+1 -> 1
comx130 compare 8 70E-1 -> 1
comx140 compare 8.0 9.0 -> -1
comx141 compare 8.0 9 -> -1
comx142 compare 8 9.0 -> -1
comx143 compare 8E+0 9.0 -> -1
comx144 compare 80E-1 9.0 -> -1
comx145 compare 0.8E+1 9 -> -1
comx146 compare 80E-1 9 -> -1
comx147 compare 8.0 9E+0 -> -1
comx148 compare 8.0 90E-1 -> -1
comx149 compare 8 0.9E+1 -> -1
comx150 compare 8 90E-1 -> -1
-- and again, with sign changes -+ ..
comx200 compare -7.0 7.0 -> -1
comx201 compare -7.0 7 -> -1
comx202 compare -7 7.0 -> -1
comx203 compare -7E+0 7.0 -> -1
comx204 compare -70E-1 7.0 -> -1
comx205 compare -0.7E+1 7 -> -1
comx206 compare -70E-1 7 -> -1
comx207 compare -7.0 7E+0 -> -1
comx208 compare -7.0 70E-1 -> -1
comx209 compare -7 0.7E+1 -> -1
comx210 compare -7 70E-1 -> -1
comx220 compare -8.0 7.0 -> -1
comx221 compare -8.0 7 -> -1
comx222 compare -8 7.0 -> -1
comx223 compare -8E+0 7.0 -> -1
comx224 compare -80E-1 7.0 -> -1
comx225 compare -0.8E+1 7 -> -1
comx226 compare -80E-1 7 -> -1
comx227 compare -8.0 7E+0 -> -1
comx228 compare -8.0 70E-1 -> -1
comx229 compare -8 0.7E+1 -> -1
comx230 compare -8 70E-1 -> -1
comx240 compare -8.0 9.0 -> -1
comx241 compare -8.0 9 -> -1
comx242 compare -8 9.0 -> -1
comx243 compare -8E+0 9.0 -> -1
comx244 compare -80E-1 9.0 -> -1
comx245 compare -0.8E+1 9 -> -1
comx246 compare -80E-1 9 -> -1
comx247 compare -8.0 9E+0 -> -1
comx248 compare -8.0 90E-1 -> -1
comx249 compare -8 0.9E+1 -> -1
comx250 compare -8 90E-1 -> -1
-- and again, with sign changes +- ..
comx300 compare 7.0 -7.0 -> 1
comx301 compare 7.0 -7 -> 1
comx302 compare 7 -7.0 -> 1
comx303 compare 7E+0 -7.0 -> 1
comx304 compare 70E-1 -7.0 -> 1
comx305 compare .7E+1 -7 -> 1
comx306 compare 70E-1 -7 -> 1
comx307 compare 7.0 -7E+0 -> 1
comx308 compare 7.0 -70E-1 -> 1
comx309 compare 7 -.7E+1 -> 1
comx310 compare 7 -70E-1 -> 1
comx320 compare 8.0 -7.0 -> 1
comx321 compare 8.0 -7 -> 1
comx322 compare 8 -7.0 -> 1
comx323 compare 8E+0 -7.0 -> 1
comx324 compare 80E-1 -7.0 -> 1
comx325 compare .8E+1 -7 -> 1
comx326 compare 80E-1 -7 -> 1
comx327 compare 8.0 -7E+0 -> 1
comx328 compare 8.0 -70E-1 -> 1
comx329 compare 8 -.7E+1 -> 1
comx330 compare 8 -70E-1 -> 1
comx340 compare 8.0 -9.0 -> 1
comx341 compare 8.0 -9 -> 1
comx342 compare 8 -9.0 -> 1
comx343 compare 8E+0 -9.0 -> 1
comx344 compare 80E-1 -9.0 -> 1
comx345 compare .8E+1 -9 -> 1
comx346 compare 80E-1 -9 -> 1
comx347 compare 8.0 -9E+0 -> 1
comx348 compare 8.0 -90E-1 -> 1
comx349 compare 8 -.9E+1 -> 1
comx350 compare 8 -90E-1 -> 1
-- and again, with sign changes -- ..
comx400 compare -7.0 -7.0 -> 0
comx401 compare -7.0 -7 -> 0
comx402 compare -7 -7.0 -> 0
comx403 compare -7E+0 -7.0 -> 0
comx404 compare -70E-1 -7.0 -> 0
comx405 compare -.7E+1 -7 -> 0
comx406 compare -70E-1 -7 -> 0
comx407 compare -7.0 -7E+0 -> 0
comx408 compare -7.0 -70E-1 -> 0
comx409 compare -7 -.7E+1 -> 0
comx410 compare -7 -70E-1 -> 0
comx420 compare -8.0 -7.0 -> -1
comx421 compare -8.0 -7 -> -1
comx422 compare -8 -7.0 -> -1
comx423 compare -8E+0 -7.0 -> -1
comx424 compare -80E-1 -7.0 -> -1
comx425 compare -.8E+1 -7 -> -1
comx426 compare -80E-1 -7 -> -1
comx427 compare -8.0 -7E+0 -> -1
comx428 compare -8.0 -70E-1 -> -1
comx429 compare -8 -.7E+1 -> -1
comx430 compare -8 -70E-1 -> -1
comx440 compare -8.0 -9.0 -> 1
comx441 compare -8.0 -9 -> 1
comx442 compare -8 -9.0 -> 1
comx443 compare -8E+0 -9.0 -> 1
comx444 compare -80E-1 -9.0 -> 1
comx445 compare -.8E+1 -9 -> 1
comx446 compare -80E-1 -9 -> 1
comx447 compare -8.0 -9E+0 -> 1
comx448 compare -8.0 -90E-1 -> 1
comx449 compare -8 -.9E+1 -> 1
comx450 compare -8 -90E-1 -> 1
-- misalignment traps for little-endian
comx451 compare 1.0 0.1 -> 1
comx452 compare 0.1 1.0 -> -1
comx453 compare 10.0 0.1 -> 1
comx454 compare 0.1 10.0 -> -1
comx455 compare 100 1.0 -> 1
comx456 compare 1.0 100 -> -1
comx457 compare 1000 10.0 -> 1
comx458 compare 10.0 1000 -> -1
comx459 compare 10000 100.0 -> 1
comx460 compare 100.0 10000 -> -1
comx461 compare 100000 1000.0 -> 1
comx462 compare 1000.0 100000 -> -1
comx463 compare 1000000 10000.0 -> 1
comx464 compare 10000.0 1000000 -> -1
-- testcases that subtract to lots of zeros at boundaries [pgr]
precision: 40
comx470 compare 123.4560000000000000E789 123.456E789 -> 0
comx471 compare 123.456000000000000E-89 123.456E-89 -> 0
comx472 compare 123.45600000000000E789 123.456E789 -> 0
comx473 compare 123.4560000000000E-89 123.456E-89 -> 0
comx474 compare 123.456000000000E789 123.456E789 -> 0
comx475 compare 123.45600000000E-89 123.456E-89 -> 0
comx476 compare 123.4560000000E789 123.456E789 -> 0
comx477 compare 123.456000000E-89 123.456E-89 -> 0
comx478 compare 123.45600000E789 123.456E789 -> 0
comx479 compare 123.4560000E-89 123.456E-89 -> 0
comx480 compare 123.456000E789 123.456E789 -> 0
comx481 compare 123.45600E-89 123.456E-89 -> 0
comx482 compare 123.4560E789 123.456E789 -> 0
comx483 compare 123.456E-89 123.456E-89 -> 0
comx484 compare 123.456E-89 123.4560000000000000E-89 -> 0
comx485 compare 123.456E789 123.456000000000000E789 -> 0
comx486 compare 123.456E-89 123.45600000000000E-89 -> 0
comx487 compare 123.456E789 123.4560000000000E789 -> 0
comx488 compare 123.456E-89 123.456000000000E-89 -> 0
comx489 compare 123.456E789 123.45600000000E789 -> 0
comx490 compare 123.456E-89 123.4560000000E-89 -> 0
comx491 compare 123.456E789 123.456000000E789 -> 0
comx492 compare 123.456E-89 123.45600000E-89 -> 0
comx493 compare 123.456E789 123.4560000E789 -> 0
comx494 compare 123.456E-89 123.456000E-89 -> 0
comx495 compare 123.456E789 123.45600E789 -> 0
comx496 compare 123.456E-89 123.4560E-89 -> 0
comx497 compare 123.456E789 123.456E789 -> 0
-- wide-ranging, around precision; signs equal
precision: 9
comx500 compare 1 1E-15 -> 1
comx501 compare 1 1E-14 -> 1
comx502 compare 1 1E-13 -> 1
comx503 compare 1 1E-12 -> 1
comx504 compare 1 1E-11 -> 1
comx505 compare 1 1E-10 -> 1
comx506 compare 1 1E-9 -> 1
comx507 compare 1 1E-8 -> 1
comx508 compare 1 1E-7 -> 1
comx509 compare 1 1E-6 -> 1
comx510 compare 1 1E-5 -> 1
comx511 compare 1 1E-4 -> 1
comx512 compare 1 1E-3 -> 1
comx513 compare 1 1E-2 -> 1
comx514 compare 1 1E-1 -> 1
comx515 compare 1 1E-0 -> 0
comx516 compare 1 1E+1 -> -1
comx517 compare 1 1E+2 -> -1
comx518 compare 1 1E+3 -> -1
comx519 compare 1 1E+4 -> -1
comx521 compare 1 1E+5 -> -1
comx522 compare 1 1E+6 -> -1
comx523 compare 1 1E+7 -> -1
comx524 compare 1 1E+8 -> -1
comx525 compare 1 1E+9 -> -1
comx526 compare 1 1E+10 -> -1
comx527 compare 1 1E+11 -> -1
comx528 compare 1 1E+12 -> -1
comx529 compare 1 1E+13 -> -1
comx530 compare 1 1E+14 -> -1
comx531 compare 1 1E+15 -> -1
-- LR swap
comx540 compare 1E-15 1 -> -1
comx541 compare 1E-14 1 -> -1
comx542 compare 1E-13 1 -> -1
comx543 compare 1E-12 1 -> -1
comx544 compare 1E-11 1 -> -1
comx545 compare 1E-10 1 -> -1
comx546 compare 1E-9 1 -> -1
comx547 compare 1E-8 1 -> -1
comx548 compare 1E-7 1 -> -1
comx549 compare 1E-6 1 -> -1
comx550 compare 1E-5 1 -> -1
comx551 compare 1E-4 1 -> -1
comx552 compare 1E-3 1 -> -1
comx553 compare 1E-2 1 -> -1
comx554 compare 1E-1 1 -> -1
comx555 compare 1E-0 1 -> 0
comx556 compare 1E+1 1 -> 1
comx557 compare 1E+2 1 -> 1
comx558 compare 1E+3 1 -> 1
comx559 compare 1E+4 1 -> 1
comx561 compare 1E+5 1 -> 1
comx562 compare 1E+6 1 -> 1
comx563 compare 1E+7 1 -> 1
comx564 compare 1E+8 1 -> 1
comx565 compare 1E+9 1 -> 1
comx566 compare 1E+10 1 -> 1
comx567 compare 1E+11 1 -> 1
comx568 compare 1E+12 1 -> 1
comx569 compare 1E+13 1 -> 1
comx570 compare 1E+14 1 -> 1
comx571 compare 1E+15 1 -> 1
-- similar with a useful coefficient, one side only
comx580 compare 0.000000987654321 1E-15 -> 1
comx581 compare 0.000000987654321 1E-14 -> 1
comx582 compare 0.000000987654321 1E-13 -> 1
comx583 compare 0.000000987654321 1E-12 -> 1
comx584 compare 0.000000987654321 1E-11 -> 1
comx585 compare 0.000000987654321 1E-10 -> 1
comx586 compare 0.000000987654321 1E-9 -> 1
comx587 compare 0.000000987654321 1E-8 -> 1
comx588 compare 0.000000987654321 1E-7 -> 1
comx589 compare 0.000000987654321 1E-6 -> -1
comx590 compare 0.000000987654321 1E-5 -> -1
comx591 compare 0.000000987654321 1E-4 -> -1
comx592 compare 0.000000987654321 1E-3 -> -1
comx593 compare 0.000000987654321 1E-2 -> -1
comx594 compare 0.000000987654321 1E-1 -> -1
comx595 compare 0.000000987654321 1E-0 -> -1
comx596 compare 0.000000987654321 1E+1 -> -1
comx597 compare 0.000000987654321 1E+2 -> -1
comx598 compare 0.000000987654321 1E+3 -> -1
comx599 compare 0.000000987654321 1E+4 -> -1
-- check some unit-y traps
precision: 20
comx600 compare 12 12.2345 -> -1
comx601 compare 12.0 12.2345 -> -1
comx602 compare 12.00 12.2345 -> -1
comx603 compare 12.000 12.2345 -> -1
comx604 compare 12.0000 12.2345 -> -1
comx605 compare 12.00000 12.2345 -> -1
comx606 compare 12.000000 12.2345 -> -1
comx607 compare 12.0000000 12.2345 -> -1
comx608 compare 12.00000000 12.2345 -> -1
comx609 compare 12.000000000 12.2345 -> -1
comx610 compare 12.1234 12 -> 1
comx611 compare 12.1234 12.0 -> 1
comx612 compare 12.1234 12.00 -> 1
comx613 compare 12.1234 12.000 -> 1
comx614 compare 12.1234 12.0000 -> 1
comx615 compare 12.1234 12.00000 -> 1
comx616 compare 12.1234 12.000000 -> 1
comx617 compare 12.1234 12.0000000 -> 1
comx618 compare 12.1234 12.00000000 -> 1
comx619 compare 12.1234 12.000000000 -> 1
comx620 compare -12 -12.2345 -> 1
comx621 compare -12.0 -12.2345 -> 1
comx622 compare -12.00 -12.2345 -> 1
comx623 compare -12.000 -12.2345 -> 1
comx624 compare -12.0000 -12.2345 -> 1
comx625 compare -12.00000 -12.2345 -> 1
comx626 compare -12.000000 -12.2345 -> 1
comx627 compare -12.0000000 -12.2345 -> 1
comx628 compare -12.00000000 -12.2345 -> 1
comx629 compare -12.000000000 -12.2345 -> 1
comx630 compare -12.1234 -12 -> -1
comx631 compare -12.1234 -12.0 -> -1
comx632 compare -12.1234 -12.00 -> -1
comx633 compare -12.1234 -12.000 -> -1
comx634 compare -12.1234 -12.0000 -> -1
comx635 compare -12.1234 -12.00000 -> -1
comx636 compare -12.1234 -12.000000 -> -1
comx637 compare -12.1234 -12.0000000 -> -1
comx638 compare -12.1234 -12.00000000 -> -1
comx639 compare -12.1234 -12.000000000 -> -1
precision: 9
-- extended zeros
comx640 compare 0 0 -> 0
comx641 compare 0 -0 -> 0
comx642 compare 0 -0.0 -> 0
comx643 compare 0 0.0 -> 0
comx644 compare -0 0 -> 0
comx645 compare -0 -0 -> 0
comx646 compare -0 -0.0 -> 0
comx647 compare -0 0.0 -> 0
comx648 compare 0.0 0 -> 0
comx649 compare 0.0 -0 -> 0
comx650 compare 0.0 -0.0 -> 0
comx651 compare 0.0 0.0 -> 0
comx652 compare -0.0 0 -> 0
comx653 compare -0.0 -0 -> 0
comx654 compare -0.0 -0.0 -> 0
comx655 compare -0.0 0.0 -> 0
comx656 compare -0E1 0.0 -> 0
comx657 compare -0E2 0.0 -> 0
comx658 compare 0E1 0.0 -> 0
comx659 compare 0E2 0.0 -> 0
comx660 compare -0E1 0 -> 0
comx661 compare -0E2 0 -> 0
comx662 compare 0E1 0 -> 0
comx663 compare 0E2 0 -> 0
comx664 compare -0E1 -0E1 -> 0
comx665 compare -0E2 -0E1 -> 0
comx666 compare 0E1 -0E1 -> 0
comx667 compare 0E2 -0E1 -> 0
comx668 compare -0E1 -0E2 -> 0
comx669 compare -0E2 -0E2 -> 0
comx670 compare 0E1 -0E2 -> 0
comx671 compare 0E2 -0E2 -> 0
comx672 compare -0E1 0E1 -> 0
comx673 compare -0E2 0E1 -> 0
comx674 compare 0E1 0E1 -> 0
comx675 compare 0E2 0E1 -> 0
comx676 compare -0E1 0E2 -> 0
comx677 compare -0E2 0E2 -> 0
comx678 compare 0E1 0E2 -> 0
comx679 compare 0E2 0E2 -> 0
-- trailing zeros; unit-y
precision: 20
comx680 compare 12 12 -> 0
comx681 compare 12 12.0 -> 0
comx682 compare 12 12.00 -> 0
comx683 compare 12 12.000 -> 0
comx684 compare 12 12.0000 -> 0
comx685 compare 12 12.00000 -> 0
comx686 compare 12 12.000000 -> 0
comx687 compare 12 12.0000000 -> 0
comx688 compare 12 12.00000000 -> 0
comx689 compare 12 12.000000000 -> 0
comx690 compare 12 12 -> 0
comx691 compare 12.0 12 -> 0
comx692 compare 12.00 12 -> 0
comx693 compare 12.000 12 -> 0
comx694 compare 12.0000 12 -> 0
comx695 compare 12.00000 12 -> 0
comx696 compare 12.000000 12 -> 0
comx697 compare 12.0000000 12 -> 0
comx698 compare 12.00000000 12 -> 0
comx699 compare 12.000000000 12 -> 0
-- long operand checks
maxexponent: 999
minexponent: -999
precision: 9
comx701 compare 12345678000 1 -> 1
comx702 compare 1 12345678000 -> -1
comx703 compare 1234567800 1 -> 1
comx704 compare 1 1234567800 -> -1
comx705 compare 1234567890 1 -> 1
comx706 compare 1 1234567890 -> -1
comx707 compare 1234567891 1 -> 1
comx708 compare 1 1234567891 -> -1
comx709 compare 12345678901 1 -> 1
comx710 compare 1 12345678901 -> -1
comx711 compare 1234567896 1 -> 1
comx712 compare 1 1234567896 -> -1
comx713 compare -1234567891 1 -> -1
comx714 compare 1 -1234567891 -> 1
comx715 compare -12345678901 1 -> -1
comx716 compare 1 -12345678901 -> 1
comx717 compare -1234567896 1 -> -1
comx718 compare 1 -1234567896 -> 1
precision: 15
-- same with plenty of precision
comx721 compare 12345678000 1 -> 1
comx722 compare 1 12345678000 -> -1
comx723 compare 1234567800 1 -> 1
comx724 compare 1 1234567800 -> -1
comx725 compare 1234567890 1 -> 1
comx726 compare 1 1234567890 -> -1
comx727 compare 1234567891 1 -> 1
comx728 compare 1 1234567891 -> -1
comx729 compare 12345678901 1 -> 1
comx730 compare 1 12345678901 -> -1
comx731 compare 1234567896 1 -> 1
comx732 compare 1 1234567896 -> -1
-- residue cases
precision: 5
comx740 compare 1 0.9999999 -> 1
comx741 compare 1 0.999999 -> 1
comx742 compare 1 0.99999 -> 1
comx743 compare 1 1.0000 -> 0
comx744 compare 1 1.00001 -> -1
comx745 compare 1 1.000001 -> -1
comx746 compare 1 1.0000001 -> -1
comx750 compare 0.9999999 1 -> -1
comx751 compare 0.999999 1 -> -1
comx752 compare 0.99999 1 -> -1
comx753 compare 1.0000 1 -> 0
comx754 compare 1.00001 1 -> 1
comx755 compare 1.000001 1 -> 1
comx756 compare 1.0000001 1 -> 1
-- a selection of longies
comx760 compare -36852134.84194296250843579428931 -5830629.8347085025808756560357940 -> -1
comx761 compare -36852134.84194296250843579428931 -36852134.84194296250843579428931 -> 0
comx762 compare -36852134.94194296250843579428931 -36852134.84194296250843579428931 -> -1
comx763 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
-- precisions above or below the difference should have no effect
precision: 11
comx764 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 10
comx765 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 9
comx766 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 8
comx767 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 7
comx768 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 6
comx769 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 5
comx770 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 4
comx771 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 3
comx772 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 2
comx773 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
precision: 1
comx774 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
-- Specials
precision: 9
comx780 compare Inf -Inf -> 1
comx781 compare Inf -1000 -> 1
comx782 compare Inf -1 -> 1
comx783 compare Inf -0 -> 1
comx784 compare Inf 0 -> 1
comx785 compare Inf 1 -> 1
comx786 compare Inf 1000 -> 1
comx787 compare Inf Inf -> 0
comx788 compare -1000 Inf -> -1
comx789 compare -Inf Inf -> -1
comx790 compare -1 Inf -> -1
comx791 compare -0 Inf -> -1
comx792 compare 0 Inf -> -1
comx793 compare 1 Inf -> -1
comx794 compare 1000 Inf -> -1
comx795 compare Inf Inf -> 0
comx800 compare -Inf -Inf -> 0
comx801 compare -Inf -1000 -> -1
comx802 compare -Inf -1 -> -1
comx803 compare -Inf -0 -> -1
comx804 compare -Inf 0 -> -1
comx805 compare -Inf 1 -> -1
comx806 compare -Inf 1000 -> -1
comx807 compare -Inf Inf -> -1
comx808 compare -Inf -Inf -> 0
comx809 compare -1000 -Inf -> 1
comx810 compare -1 -Inf -> 1
comx811 compare -0 -Inf -> 1
comx812 compare 0 -Inf -> 1
comx813 compare 1 -Inf -> 1
comx814 compare 1000 -Inf -> 1
comx815 compare Inf -Inf -> 1
comx821 compare NaN -Inf -> NaN
comx822 compare NaN -1000 -> NaN
comx823 compare NaN -1 -> NaN
comx824 compare NaN -0 -> NaN
comx825 compare NaN 0 -> NaN
comx826 compare NaN 1 -> NaN
comx827 compare NaN 1000 -> NaN
comx828 compare NaN Inf -> NaN
comx829 compare NaN NaN -> NaN
comx830 compare -Inf NaN -> NaN
comx831 compare -1000 NaN -> NaN
comx832 compare -1 NaN -> NaN
comx833 compare -0 NaN -> NaN
comx834 compare 0 NaN -> NaN
comx835 compare 1 NaN -> NaN
comx836 compare 1000 NaN -> NaN
comx837 compare Inf NaN -> NaN
comx838 compare -NaN -NaN -> -NaN
comx839 compare +NaN -NaN -> NaN
comx840 compare -NaN +NaN -> -NaN
comx841 compare sNaN -Inf -> NaN Invalid_operation
comx842 compare sNaN -1000 -> NaN Invalid_operation
comx843 compare sNaN -1 -> NaN Invalid_operation
comx844 compare sNaN -0 -> NaN Invalid_operation
comx845 compare sNaN 0 -> NaN Invalid_operation
comx846 compare sNaN 1 -> NaN Invalid_operation
comx847 compare sNaN 1000 -> NaN Invalid_operation
comx848 compare sNaN NaN -> NaN Invalid_operation
comx849 compare sNaN sNaN -> NaN Invalid_operation
comx850 compare NaN sNaN -> NaN Invalid_operation
comx851 compare -Inf sNaN -> NaN Invalid_operation
comx852 compare -1000 sNaN -> NaN Invalid_operation
comx853 compare -1 sNaN -> NaN Invalid_operation
comx854 compare -0 sNaN -> NaN Invalid_operation
comx855 compare 0 sNaN -> NaN Invalid_operation
comx856 compare 1 sNaN -> NaN Invalid_operation
comx857 compare 1000 sNaN -> NaN Invalid_operation
comx858 compare Inf sNaN -> NaN Invalid_operation
comx859 compare NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
comx860 compare NaN9 -Inf -> NaN9
comx861 compare NaN8 999 -> NaN8
comx862 compare NaN77 Inf -> NaN77
comx863 compare -NaN67 NaN5 -> -NaN67
comx864 compare -Inf -NaN4 -> -NaN4
comx865 compare -999 -NaN33 -> -NaN33
comx866 compare Inf NaN2 -> NaN2
comx867 compare -NaN41 -NaN42 -> -NaN41
comx868 compare +NaN41 -NaN42 -> NaN41
comx869 compare -NaN41 +NaN42 -> -NaN41
comx870 compare +NaN41 +NaN42 -> NaN41
comx871 compare -sNaN99 -Inf -> -NaN99 Invalid_operation
comx872 compare sNaN98 -11 -> NaN98 Invalid_operation
comx873 compare sNaN97 NaN -> NaN97 Invalid_operation
comx874 compare sNaN16 sNaN94 -> NaN16 Invalid_operation
comx875 compare NaN85 sNaN83 -> NaN83 Invalid_operation
comx876 compare -Inf sNaN92 -> NaN92 Invalid_operation
comx877 compare 088 sNaN81 -> NaN81 Invalid_operation
comx878 compare Inf sNaN90 -> NaN90 Invalid_operation
comx879 compare NaN -sNaN89 -> -NaN89 Invalid_operation
-- overflow and underflow tests .. subnormal results now allowed
maxExponent: 999999999
minexponent: -999999999
comx880 compare +1.23456789012345E-0 9E+999999999 -> -1
comx881 compare 9E+999999999 +1.23456789012345E-0 -> 1
comx882 compare +0.100 9E-999999999 -> 1
comx883 compare 9E-999999999 +0.100 -> -1
comx885 compare -1.23456789012345E-0 9E+999999999 -> -1
comx886 compare 9E+999999999 -1.23456789012345E-0 -> 1
comx887 compare -0.100 9E-999999999 -> -1
comx888 compare 9E-999999999 -0.100 -> 1
comx889 compare 1e-599999999 1e-400000001 -> -1
comx890 compare 1e-599999999 1e-400000000 -> -1
comx891 compare 1e-600000000 1e-400000000 -> -1
comx892 compare 9e-999999998 0.01 -> -1
comx893 compare 9e-999999998 0.1 -> -1
comx894 compare 0.01 9e-999999998 -> 1
comx895 compare 1e599999999 1e400000001 -> 1
comx896 compare 1e599999999 1e400000000 -> 1
comx897 compare 1e600000000 1e400000000 -> 1
comx898 compare 9e999999998 100 -> 1
comx899 compare 9e999999998 10 -> 1
comx900 compare 100 9e999999998 -> -1
-- signs
comx901 compare 1e+777777777 1e+411111111 -> 1
comx902 compare 1e+777777777 -1e+411111111 -> 1
comx903 compare -1e+777777777 1e+411111111 -> -1
comx904 compare -1e+777777777 -1e+411111111 -> -1
comx905 compare 1e-777777777 1e-411111111 -> -1
comx906 compare 1e-777777777 -1e-411111111 -> 1
comx907 compare -1e-777777777 1e-411111111 -> -1
comx908 compare -1e-777777777 -1e-411111111 -> 1
-- spread zeros
comx910 compare 0E-383 0 -> 0
comx911 compare 0E-383 -0 -> 0
comx912 compare -0E-383 0 -> 0
comx913 compare -0E-383 -0 -> 0
comx914 compare 0E-383 0E+384 -> 0
comx915 compare 0E-383 -0E+384 -> 0
comx916 compare -0E-383 0E+384 -> 0
comx917 compare -0E-383 -0E+384 -> 0
comx918 compare 0 0E+384 -> 0
comx919 compare 0 -0E+384 -> 0
comx920 compare -0 0E+384 -> 0
comx921 compare -0 -0E+384 -> 0
comx930 compare 0E+384 0 -> 0
comx931 compare 0E+384 -0 -> 0
comx932 compare -0E+384 0 -> 0
comx933 compare -0E+384 -0 -> 0
comx934 compare 0E+384 0E-383 -> 0
comx935 compare 0E+384 -0E-383 -> 0
comx936 compare -0E+384 0E-383 -> 0
comx937 compare -0E+384 -0E-383 -> 0
comx938 compare 0 0E-383 -> 0
comx939 compare 0 -0E-383 -> 0
comx940 compare -0 0E-383 -> 0
comx941 compare -0 -0E-383 -> 0
-- Null tests
comx990 compare 10 # -> NaN Invalid_operation
comx991 compare # 10 -> NaN Invalid_operation

Some files were not shown because too many files have changed in this diff Show more