From 4f1ad1fe64b29d073f9158d45d95f6bb93684bc5 Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Mon, 25 Mar 2019 13:00:15 +0000 Subject: [PATCH] added a few more test cases --- moo/kernel/test-001.moo | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/moo/kernel/test-001.moo b/moo/kernel/test-001.moo index e854333..22d1d32 100644 --- a/moo/kernel/test-001.moo +++ b/moo/kernel/test-001.moo @@ -255,34 +255,51 @@ extend MyObject [ (+30p2123.12 asString) = '2123.120000000000000000000000000000' ], [ (-30p2123.12 asString) = '-2123.120000000000000000000000000000' ], [ (811306333091350399588761 div: 16) = 50706645818209399974297 ], - [ (811306333091350399588761 rem: 16) = 9 ], + [ (811306333091350399588761 mdiv: 16) = 50706645818209399974297 ], + ## 95-99 + [ (811306333091350399588761 rem: 16) = 9 ], [ (811306333091350399588761 mod: 16) = 9 ], [ (811306333091350399588761 div: 128) = 6338330727276174996787 ], + [ (811306333091350399588761 mdiv: 128) = 6338330727276174996787 ], [ (811306333091350399588761 rem: 128) = 25 ], - [ (811306333091350399588761 mod: 128) = 25 ], - [ (-811306333091350399588761 div: -16) = 50706645818209399974297 ], ## 100-104 + [ (811306333091350399588761 mod: 128) = 25 ], + [ (-811306333091350399588761 div: -16) = 50706645818209399974297 ], + [ (-811306333091350399588761 mdiv: -16) = 50706645818209399974297 ], [ (-811306333091350399588761 rem: -16) = -9 ], [ (-811306333091350399588761 mod: -16) = -9 ], - [ (-811306333091350399588761 div: -128) = 6338330727276174996787 ], - [ (-811306333091350399588761 rem: -128) = -25 ], - [ (-811306333091350399588761 mod: -128) = -25 ], ## 105-109 + [ (-811306333091350399588761 div: -128) = 6338330727276174996787 ], + [ (-811306333091350399588761 mdiv: -128) = 6338330727276174996787 ], + [ (-811306333091350399588761 rem: -128) = -25 ], + [ (-811306333091350399588761 mod: -128) = -25 ], [ (-8113063330913503995887611892379812731289731289312898971231 div: -1024) = 7922913409095218745983995988652160870400128212219627901 ], + + ## 110-114 + [ (-8113063330913503995887611892379812731289731289312898971231 mdiv: -1024) = 7922913409095218745983995988652160870400128212219627901 ], [ (-8113063330913503995887611892379812731289731289312898971231 rem: -1024) = -607 ], [ (-8113063330913503995887611892379812731289731289312898971231 mod: -1024) = -607 ], [ (-8113063330913503995887611892379812731289731289312898971231 div: -65535) = 123797411015693964994088836383303772507663558240831600 ], - [ (-8113063330913503995887611892379812731289731289312898971231 rem: -65535) = -65231 ], + [ (-8113063330913503995887611892379812731289731289312898971231 mdiv: -65535) = 123797411015693964994088836383303772507663558240831600 ], - ## 110-114 + ## 115-119 + [ (-8113063330913503995887611892379812731289731289312898971231 rem: -65535) = -65231 ], [ (-8113063330913503995887611892379812731289731289312898971231 mod: -65535) = -65231 ], [ (-8113063330913503995887611892379812731289731289312898971231 div: -65536) = 123795522017112792905999937322690013600002003315931685 ], + [ (-8113063330913503995887611892379812731289731289312898971231 mdiv: -65536) = 123795522017112792905999937322690013600002003315931685 ], [ (-8113063330913503995887611892379812731289731289312898971231 rem: -65536) = -63071 ], + + ## 120-124 [ (-8113063330913503995887611892379812731289731289312898971231 mod: -65536) = -63071 ], + [ (-8113063330913503995887611892379812731289731289312898971231 div: 65535) = -123797411015693964994088836383303772507663558240831600 ], + [ (-8113063330913503995887611892379812731289731289312898971231 mdiv: 65535) = -123797411015693964994088836383303772507663558240831601 ], + [ (-8113063330913503995887611892379812731289731289312898971231 rem: 65535) = -65231 ], + [ (-8113063330913503995887611892379812731289731289312898971231 mod: 65535) = 304 ], + ## ========================= [