Best Python code snippet using selene_python
simd-mandelbrot.js
Source:simd-mandelbrot.js
1// |jit-test| test-also-noasmjs2/* -*- Mode: javascript; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 ; js-indent-level : 2 ; js-curly-indent-offset: 0 -*- */3/* vim: set ts=2 et sw=2 tw=80: */4// Mandelbrot using SIMD5// Author: Peter Jensen, Intel Corporation6load(libdir + "asm.js");7if (!isSimdAvailable() || typeof SIMD === 'undefined') {8 print("won't run tests as simd extensions aren't activated yet");9 quit(0);10}11// global variables12const MAX_ITERATIONS = 10;13const DRAW_ITERATIONS = 10;14const CANVAS_WIDTH = 20;15const CANVAS_HEIGHT = 20;16const LIMIT_SHOW = 20 * 20 * 4;17// Asm.js module buffer.18var buffer = new ArrayBuffer(16 * 1024 * 1024);19var view = new Uint8Array(buffer);20var moduleCode = `21 "use asm"22 var b8 = new global.Uint8Array(buffer);23 var toF = global.Math.fround;24 var i4 = global.SIMD.Int32x4;25 var ci4 = i4.check;26 var f4 = global.SIMD.Float32x4;27 var i4add = i4.add;28 var i4and = i4.and;29 var i4ext = i4.extractLane;30 var f4add = f4.add;31 var f4sub = f4.sub;32 var f4mul = f4.mul;33 var f4lessThanOrEqual = f4.lessThanOrEqual;34 var f4splat = f4.splat;35 var imul = global.Math.imul;36 const one4 = i4(1,1,1,1), two4 = f4(2,2,2,2), four4 = f4(4,4,4,4);37 const mk0 = 0x007fffff;38 function declareHeapLength() {39 b8[0x00ffffff] = 0;40 }41 function mapColorAndSetPixel (x, y, width, value, max_iterations) {42 x = x | 0;43 y = y | 0;44 width = width | 0;45 value = value | 0;46 max_iterations = max_iterations | 0;47 var rgb = 0, r = 0, g = 0, b = 0, index = 0;48 index = (((imul((width >>> 0), (y >>> 0)) + x) | 0) * 4) | 0;49 if ((value | 0) == (max_iterations | 0)) {50 r = 0;51 g = 0;52 b = 0;53 } else {54 rgb = ~~toF(toF(toF(toF(value >>> 0) * toF(0xffff)) / toF(max_iterations >>> 0)) * toF(0xff));55 r = rgb & 0xff;56 g = (rgb >>> 8) & 0xff;57 b = (rgb >>> 16) & 0xff;58 }59 b8[(index & mk0) >> 0] = r;60 b8[(index & mk0) + 1 >> 0] = g;61 b8[(index & mk0) + 2 >> 0] = b;62 b8[(index & mk0) + 3 >> 0] = 255;63 }64 function mandelPixelX4 (xf, yf, yd, max_iterations) {65 xf = toF(xf);66 yf = toF(yf);67 yd = toF(yd);68 max_iterations = max_iterations | 0;69 var c_re4 = f4(0,0,0,0), c_im4 = f4(0,0,0,0);70 var z_re4 = f4(0,0,0,0), z_im4 = f4(0,0,0,0);71 var count4 = i4(0,0,0,0);72 var z_re24 = f4(0,0,0,0), z_im24 = f4(0,0,0,0);73 var new_re4 = f4(0,0,0,0), new_im4 = f4(0,0,0,0);74 var i = 0;75 var mi4 = i4(0,0,0,0);76 c_re4 = f4splat(xf);77 c_im4 = f4(yf, toF(yd + yf), toF(yd + toF(yd + yf)), toF(yd + toF(yd + toF(yd + yf))));78 z_re4 = c_re4;79 z_im4 = c_im4;80 for (i = 0; (i | 0) < (max_iterations | 0); i = (i + 1) | 0) {81 z_re24 = f4mul(z_re4, z_re4);82 z_im24 = f4mul(z_im4, z_im4);83 mi4 = f4lessThanOrEqual(f4add(z_re24, z_im24), four4);84 // If all 4 values are greater than 4.0, there's no reason to continue.85 if ((mi4.signMask | 0) == 0x00)86 break;87 new_re4 = f4sub(z_re24, z_im24);88 new_im4 = f4mul(f4mul(two4, z_re4), z_im4);89 z_re4 = f4add(c_re4, new_re4);90 z_im4 = f4add(c_im4, new_im4);91 count4 = i4add(count4, i4and(mi4, one4));92 }93 return ci4(count4);94 }95 function mandelColumnX4 (x, width, height, xf, yf, yd, max_iterations) {96 x = x | 0;97 width = width | 0;98 height = height | 0;99 xf = toF(xf);100 yf = toF(yf);101 yd = toF(yd);102 max_iterations = max_iterations | 0;103 var y = 0;104 var ydx4 = toF(0);105 var m4 = i4(0,0,0,0);106 ydx4 = toF(yd * toF(4));107 for (y = 0; (y | 0) < (height | 0); y = (y + 4) | 0) {108 m4 = ci4(mandelPixelX4(toF(xf), toF(yf), toF(yd), max_iterations));109 mapColorAndSetPixel(x | 0, y | 0, width, i4ext(m4,0), max_iterations);110 mapColorAndSetPixel(x | 0, (y + 1) | 0, width, i4ext(m4,1), max_iterations);111 mapColorAndSetPixel(x | 0, (y + 2) | 0, width, i4ext(m4,2), max_iterations);112 mapColorAndSetPixel(x | 0, (y + 3) | 0, width, i4ext(m4,3), max_iterations);113 yf = toF(yf + ydx4);114 }115 }116 function mandel (width, height, xc, yc, scale, max_iterations) {117 width = width | 0;118 height = height | 0;119 xc = toF(xc);120 yc = toF(yc);121 scale = toF(scale);122 max_iterations = max_iterations | 0;123 var x0 = toF(0), y0 = toF(0);124 var xd = toF(0), yd = toF(0);125 var xf = toF(0);126 var x = 0;127 x0 = toF(xc - toF(scale * toF(1.5)));128 y0 = toF(yc - scale);129 xd = toF(toF(scale * toF(3)) / toF(width >>> 0));130 yd = toF(toF(scale * toF(2)) / toF(height >>> 0));131 xf = x0;132 for (x = 0; (x | 0) < (width | 0); x = (x + 1) | 0) {133 mandelColumnX4(x, width, height, xf, y0, yd, max_iterations);134 xf = toF(xf + xd);135 }136 }137 return mandel;138`;139var FFI = {};140var mandelbro = asmLink(asmCompile('global', 'ffi', 'buffer', moduleCode), this, FFI, buffer);141function animateMandelbrot () {142 var scale_start = 1.0;143 var scale_end = 0.0005;144 var xc_start = -0.5;145 var yc_start = 0.0;146 var xc_end = 0.0;147 var yc_end = 0.75;148 var steps = 200.0;149 var scale_step = (scale_end - scale_start)/steps;150 var xc_step = (xc_end - xc_start)/steps;151 var yc_step = (yc_end - yc_start)/steps;152 var scale = scale_start;153 var xc = xc_start;154 var yc = yc_start;155 var i = 0;156 var now = dateNow();157 function draw1 () {158 mandelbro(CANVAS_WIDTH, CANVAS_HEIGHT, xc, yc, scale, MAX_ITERATIONS);159 if (scale < scale_end || scale > scale_start) {160 scale_step = -scale_step;161 xc_step = -xc_step;162 yc_step = -yc_step;163 }164 scale += scale_step;165 xc += xc_step;166 yc += yc_step;167 i++;168 }169 var b = dateNow();170 for (var j = DRAW_ITERATIONS; j --> 0;)171 draw1();172 print(dateNow() - b);173}174animateMandelbrot();175assertEq(view[0], 0, "0th value should be 0");176assertEq(view[1], 0, "1th value should be 0");177assertEq(view[2], 0, "2th value should be 0");178assertEq(view[3], 255, "3th value should be 255");179assertEq(view[4], 230, "4th value should be 230");180assertEq(view[5], 127, "5th value should be 127");181assertEq(view[6], 25, "6th value should be 25");182assertEq(view[7], 255, "7th value should be 255");183assertEq(view[8], 230, "8th value should be 230");184assertEq(view[9], 127, "9th value should be 127");185assertEq(view[10], 25, "10th value should be 25");186assertEq(view[11], 255, "11th value should be 255");187assertEq(view[12], 205, "12th value should be 205");188assertEq(view[13], 255, "13th value should be 255");189assertEq(view[14], 50, "14th value should be 50");190assertEq(view[15], 255, "15th value should be 255");191assertEq(view[16], 205, "16th value should be 205");192assertEq(view[17], 255, "17th value should be 255");193assertEq(view[18], 50, "18th value should be 50");194assertEq(view[19], 255, "19th value should be 255");195assertEq(view[20], 205, "20th value should be 205");196assertEq(view[21], 255, "21th value should be 255");197assertEq(view[22], 50, "22th value should be 50");198assertEq(view[23], 255, "23th value should be 255");199assertEq(view[24], 205, "24th value should be 205");200assertEq(view[25], 255, "25th value should be 255");201assertEq(view[26], 50, "26th value should be 50");202assertEq(view[27], 255, "27th value should be 255");203assertEq(view[28], 205, "28th value should be 205");204assertEq(view[29], 255, "29th value should be 255");205assertEq(view[30], 50, "30th value should be 50");206assertEq(view[31], 255, "31th value should be 255");207assertEq(view[32], 179, "32th value should be 179");208assertEq(view[33], 127, "33th value should be 127");209assertEq(view[34], 76, "34th value should be 76");210assertEq(view[35], 255, "35th value should be 255");211assertEq(view[36], 179, "36th value should be 179");212assertEq(view[37], 127, "37th value should be 127");213assertEq(view[38], 76, "38th value should be 76");214assertEq(view[39], 255, "39th value should be 255");215assertEq(view[40], 179, "40th value should be 179");216assertEq(view[41], 127, "41th value should be 127");217assertEq(view[42], 76, "42th value should be 76");218assertEq(view[43], 255, "43th value should be 255");219assertEq(view[44], 154, "44th value should be 154");220assertEq(view[45], 255, "45th value should be 255");221assertEq(view[46], 101, "46th value should be 101");222assertEq(view[47], 255, "47th value should be 255");223assertEq(view[48], 78, "48th value should be 78");224assertEq(view[49], 127, "49th value should be 127");225assertEq(view[50], 178, "50th value should be 178");226assertEq(view[51], 255, "51th value should be 255");227assertEq(view[52], 52, "52th value should be 52");228assertEq(view[53], 255, "53th value should be 255");229assertEq(view[54], 203, "54th value should be 203");230assertEq(view[55], 255, "55th value should be 255");231assertEq(view[56], 154, "56th value should be 154");232assertEq(view[57], 255, "57th value should be 255");233assertEq(view[58], 101, "58th value should be 101");234assertEq(view[59], 255, "59th value should be 255");235assertEq(view[60], 179, "60th value should be 179");236assertEq(view[61], 127, "61th value should be 127");237assertEq(view[62], 76, "62th value should be 76");238assertEq(view[63], 255, "63th value should be 255");239assertEq(view[64], 205, "64th value should be 205");240assertEq(view[65], 255, "65th value should be 255");241assertEq(view[66], 50, "66th value should be 50");242assertEq(view[67], 255, "67th value should be 255");243assertEq(view[68], 205, "68th value should be 205");244assertEq(view[69], 255, "69th value should be 255");245assertEq(view[70], 50, "70th value should be 50");246assertEq(view[71], 255, "71th value should be 255");247assertEq(view[72], 230, "72th value should be 230");248assertEq(view[73], 127, "73th value should be 127");249assertEq(view[74], 25, "74th value should be 25");250assertEq(view[75], 255, "75th value should be 255");251assertEq(view[76], 230, "76th value should be 230");252assertEq(view[77], 127, "77th value should be 127");253assertEq(view[78], 25, "78th value should be 25");254assertEq(view[79], 255, "79th value should be 255");255assertEq(view[80], 0, "80th value should be 0");256assertEq(view[81], 0, "81th value should be 0");257assertEq(view[82], 0, "82th value should be 0");258assertEq(view[83], 255, "83th value should be 255");259assertEq(view[84], 230, "84th value should be 230");260assertEq(view[85], 127, "85th value should be 127");261assertEq(view[86], 25, "86th value should be 25");262assertEq(view[87], 255, "87th value should be 255");263assertEq(view[88], 205, "88th value should be 205");264assertEq(view[89], 255, "89th value should be 255");265assertEq(view[90], 50, "90th value should be 50");266assertEq(view[91], 255, "91th value should be 255");267assertEq(view[92], 205, "92th value should be 205");268assertEq(view[93], 255, "93th value should be 255");269assertEq(view[94], 50, "94th value should be 50");270assertEq(view[95], 255, "95th value should be 255");271assertEq(view[96], 205, "96th value should be 205");272assertEq(view[97], 255, "97th value should be 255");273assertEq(view[98], 50, "98th value should be 50");274assertEq(view[99], 255, "99th value should be 255");275assertEq(view[100], 205, "100th value should be 205");276assertEq(view[101], 255, "101th value should be 255");277assertEq(view[102], 50, "102th value should be 50");278assertEq(view[103], 255, "103th value should be 255");279assertEq(view[104], 205, "104th value should be 205");280assertEq(view[105], 255, "105th value should be 255");281assertEq(view[106], 50, "106th value should be 50");282assertEq(view[107], 255, "107th value should be 255");283assertEq(view[108], 205, "108th value should be 205");284assertEq(view[109], 255, "109th value should be 255");285assertEq(view[110], 50, "110th value should be 50");286assertEq(view[111], 255, "111th value should be 255");287assertEq(view[112], 179, "112th value should be 179");288assertEq(view[113], 127, "113th value should be 127");289assertEq(view[114], 76, "114th value should be 76");290assertEq(view[115], 255, "115th value should be 255");291assertEq(view[116], 179, "116th value should be 179");292assertEq(view[117], 127, "117th value should be 127");293assertEq(view[118], 76, "118th value should be 76");294assertEq(view[119], 255, "119th value should be 255");295assertEq(view[120], 154, "120th value should be 154");296assertEq(view[121], 255, "121th value should be 255");297assertEq(view[122], 101, "122th value should be 101");298assertEq(view[123], 255, "123th value should be 255");299assertEq(view[124], 103, "124th value should be 103");300assertEq(view[125], 255, "125th value should be 255");301assertEq(view[126], 152, "126th value should be 152");302assertEq(view[127], 255, "127th value should be 255");303assertEq(view[128], 0, "128th value should be 0");304assertEq(view[129], 0, "129th value should be 0");305assertEq(view[130], 0, "130th value should be 0");306assertEq(view[131], 255, "131th value should be 255");307assertEq(view[132], 0, "132th value should be 0");308assertEq(view[133], 0, "133th value should be 0");309assertEq(view[134], 0, "134th value should be 0");310assertEq(view[135], 255, "135th value should be 255");311assertEq(view[136], 128, "136th value should be 128");312assertEq(view[137], 127, "137th value should be 127");313assertEq(view[138], 127, "138th value should be 127");314assertEq(view[139], 255, "139th value should be 255");315assertEq(view[140], 154, "140th value should be 154");316assertEq(view[141], 255, "141th value should be 255");317assertEq(view[142], 101, "142th value should be 101");318assertEq(view[143], 255, "143th value should be 255");319assertEq(view[144], 179, "144th value should be 179");320assertEq(view[145], 127, "145th value should be 127");321assertEq(view[146], 76, "146th value should be 76");322assertEq(view[147], 255, "147th value should be 255");323assertEq(view[148], 205, "148th value should be 205");324assertEq(view[149], 255, "149th value should be 255");325assertEq(view[150], 50, "150th value should be 50");326assertEq(view[151], 255, "151th value should be 255");327assertEq(view[152], 205, "152th value should be 205");328assertEq(view[153], 255, "153th value should be 255");329assertEq(view[154], 50, "154th value should be 50");330assertEq(view[155], 255, "155th value should be 255");331assertEq(view[156], 230, "156th value should be 230");332assertEq(view[157], 127, "157th value should be 127");333assertEq(view[158], 25, "158th value should be 25");334assertEq(view[159], 255, "159th value should be 255");335assertEq(view[160], 0, "160th value should be 0");336assertEq(view[161], 0, "161th value should be 0");337assertEq(view[162], 0, "162th value should be 0");338assertEq(view[163], 255, "163th value should be 255");339assertEq(view[164], 230, "164th value should be 230");340assertEq(view[165], 127, "165th value should be 127");341assertEq(view[166], 25, "166th value should be 25");342assertEq(view[167], 255, "167th value should be 255");343assertEq(view[168], 205, "168th value should be 205");344assertEq(view[169], 255, "169th value should be 255");345assertEq(view[170], 50, "170th value should be 50");346assertEq(view[171], 255, "171th value should be 255");347assertEq(view[172], 205, "172th value should be 205");348assertEq(view[173], 255, "173th value should be 255");349assertEq(view[174], 50, "174th value should be 50");350assertEq(view[175], 255, "175th value should be 255");351assertEq(view[176], 205, "176th value should be 205");352assertEq(view[177], 255, "177th value should be 255");353assertEq(view[178], 50, "178th value should be 50");354assertEq(view[179], 255, "179th value should be 255");355assertEq(view[180], 205, "180th value should be 205");356assertEq(view[181], 255, "181th value should be 255");357assertEq(view[182], 50, "182th value should be 50");358assertEq(view[183], 255, "183th value should be 255");359assertEq(view[184], 205, "184th value should be 205");360assertEq(view[185], 255, "185th value should be 255");361assertEq(view[186], 50, "186th value should be 50");362assertEq(view[187], 255, "187th value should be 255");363assertEq(view[188], 179, "188th value should be 179");364assertEq(view[189], 127, "189th value should be 127");365assertEq(view[190], 76, "190th value should be 76");366assertEq(view[191], 255, "191th value should be 255");367assertEq(view[192], 179, "192th value should be 179");368assertEq(view[193], 127, "193th value should be 127");369assertEq(view[194], 76, "194th value should be 76");370assertEq(view[195], 255, "195th value should be 255");371assertEq(view[196], 154, "196th value should be 154");372assertEq(view[197], 255, "197th value should be 255");373assertEq(view[198], 101, "198th value should be 101");374assertEq(view[199], 255, "199th value should be 255");375assertEq(view[200], 103, "200th value should be 103");376assertEq(view[201], 255, "201th value should be 255");377assertEq(view[202], 152, "202th value should be 152");378assertEq(view[203], 255, "203th value should be 255");379assertEq(view[204], 78, "204th value should be 78");380assertEq(view[205], 127, "205th value should be 127");381assertEq(view[206], 178, "206th value should be 178");382assertEq(view[207], 255, "207th value should be 255");383assertEq(view[208], 0, "208th value should be 0");384assertEq(view[209], 0, "209th value should be 0");385assertEq(view[210], 0, "210th value should be 0");386assertEq(view[211], 255, "211th value should be 255");387assertEq(view[212], 0, "212th value should be 0");388assertEq(view[213], 0, "213th value should be 0");389assertEq(view[214], 0, "214th value should be 0");390assertEq(view[215], 255, "215th value should be 255");391assertEq(view[216], 78, "216th value should be 78");392assertEq(view[217], 127, "217th value should be 127");393assertEq(view[218], 178, "218th value should be 178");394assertEq(view[219], 255, "219th value should be 255");395assertEq(view[220], 128, "220th value should be 128");396assertEq(view[221], 127, "221th value should be 127");397assertEq(view[222], 127, "222th value should be 127");398assertEq(view[223], 255, "223th value should be 255");399assertEq(view[224], 154, "224th value should be 154");400assertEq(view[225], 255, "225th value should be 255");401assertEq(view[226], 101, "226th value should be 101");402assertEq(view[227], 255, "227th value should be 255");403assertEq(view[228], 205, "228th value should be 205");404assertEq(view[229], 255, "229th value should be 255");405assertEq(view[230], 50, "230th value should be 50");406assertEq(view[231], 255, "231th value should be 255");407assertEq(view[232], 205, "232th value should be 205");408assertEq(view[233], 255, "233th value should be 255");409assertEq(view[234], 50, "234th value should be 50");410assertEq(view[235], 255, "235th value should be 255");411assertEq(view[236], 230, "236th value should be 230");412assertEq(view[237], 127, "237th value should be 127");413assertEq(view[238], 25, "238th value should be 25");414assertEq(view[239], 255, "239th value should be 255");415assertEq(view[240], 0, "240th value should be 0");416assertEq(view[241], 0, "241th value should be 0");417assertEq(view[242], 0, "242th value should be 0");418assertEq(view[243], 255, "243th value should be 255");419assertEq(view[244], 205, "244th value should be 205");420assertEq(view[245], 255, "245th value should be 255");421assertEq(view[246], 50, "246th value should be 50");422assertEq(view[247], 255, "247th value should be 255");423assertEq(view[248], 205, "248th value should be 205");424assertEq(view[249], 255, "249th value should be 255");425assertEq(view[250], 50, "250th value should be 50");426assertEq(view[251], 255, "251th value should be 255");427assertEq(view[252], 205, "252th value should be 205");428assertEq(view[253], 255, "253th value should be 255");429assertEq(view[254], 50, "254th value should be 50");430assertEq(view[255], 255, "255th value should be 255");431assertEq(view[256], 205, "256th value should be 205");432assertEq(view[257], 255, "257th value should be 255");433assertEq(view[258], 50, "258th value should be 50");434assertEq(view[259], 255, "259th value should be 255");435assertEq(view[260], 205, "260th value should be 205");436assertEq(view[261], 255, "261th value should be 255");437assertEq(view[262], 50, "262th value should be 50");438assertEq(view[263], 255, "263th value should be 255");439assertEq(view[264], 179, "264th value should be 179");440assertEq(view[265], 127, "265th value should be 127");441assertEq(view[266], 76, "266th value should be 76");442assertEq(view[267], 255, "267th value should be 255");443assertEq(view[268], 179, "268th value should be 179");444assertEq(view[269], 127, "269th value should be 127");445assertEq(view[270], 76, "270th value should be 76");446assertEq(view[271], 255, "271th value should be 255");447assertEq(view[272], 154, "272th value should be 154");448assertEq(view[273], 255, "273th value should be 255");449assertEq(view[274], 101, "274th value should be 101");450assertEq(view[275], 255, "275th value should be 255");451assertEq(view[276], 52, "276th value should be 52");452assertEq(view[277], 255, "277th value should be 255");453assertEq(view[278], 203, "278th value should be 203");454assertEq(view[279], 255, "279th value should be 255");455assertEq(view[280], 0, "280th value should be 0");456assertEq(view[281], 0, "281th value should be 0");457assertEq(view[282], 0, "282th value should be 0");458assertEq(view[283], 255, "283th value should be 255");459assertEq(view[284], 0, "284th value should be 0");460assertEq(view[285], 0, "285th value should be 0");461assertEq(view[286], 0, "286th value should be 0");462assertEq(view[287], 255, "287th value should be 255");463assertEq(view[288], 0, "288th value should be 0");464assertEq(view[289], 0, "289th value should be 0");465assertEq(view[290], 0, "290th value should be 0");466assertEq(view[291], 255, "291th value should be 255");467assertEq(view[292], 0, "292th value should be 0");468assertEq(view[293], 0, "293th value should be 0");469assertEq(view[294], 0, "294th value should be 0");470assertEq(view[295], 255, "295th value should be 255");471assertEq(view[296], 0, "296th value should be 0");472assertEq(view[297], 0, "297th value should be 0");473assertEq(view[298], 0, "298th value should be 0");474assertEq(view[299], 255, "299th value should be 255");475assertEq(view[300], 52, "300th value should be 52");476assertEq(view[301], 255, "301th value should be 255");477assertEq(view[302], 203, "302th value should be 203");478assertEq(view[303], 255, "303th value should be 255");479assertEq(view[304], 52, "304th value should be 52");480assertEq(view[305], 255, "305th value should be 255");481assertEq(view[306], 203, "306th value should be 203");482assertEq(view[307], 255, "307th value should be 255");483assertEq(view[308], 179, "308th value should be 179");484assertEq(view[309], 127, "309th value should be 127");485assertEq(view[310], 76, "310th value should be 76");486assertEq(view[311], 255, "311th value should be 255");487assertEq(view[312], 205, "312th value should be 205");488assertEq(view[313], 255, "313th value should be 255");489assertEq(view[314], 50, "314th value should be 50");490assertEq(view[315], 255, "315th value should be 255");491assertEq(view[316], 205, "316th value should be 205");492assertEq(view[317], 255, "317th value should be 255");493assertEq(view[318], 50, "318th value should be 50");494assertEq(view[319], 255, "319th value should be 255");495assertEq(view[320], 230, "320th value should be 230");496assertEq(view[321], 127, "321th value should be 127");497assertEq(view[322], 25, "322th value should be 25");498assertEq(view[323], 255, "323th value should be 255");499assertEq(view[324], 205, "324th value should be 205");500assertEq(view[325], 255, "325th value should be 255");501assertEq(view[326], 50, "326th value should be 50");502assertEq(view[327], 255, "327th value should be 255");503assertEq(view[328], 205, "328th value should be 205");504assertEq(view[329], 255, "329th value should be 255");505assertEq(view[330], 50, "330th value should be 50");506assertEq(view[331], 255, "331th value should be 255");507assertEq(view[332], 205, "332th value should be 205");508assertEq(view[333], 255, "333th value should be 255");509assertEq(view[334], 50, "334th value should be 50");510assertEq(view[335], 255, "335th value should be 255");511assertEq(view[336], 205, "336th value should be 205");512assertEq(view[337], 255, "337th value should be 255");513assertEq(view[338], 50, "338th value should be 50");514assertEq(view[339], 255, "339th value should be 255");515assertEq(view[340], 179, "340th value should be 179");516assertEq(view[341], 127, "341th value should be 127");517assertEq(view[342], 76, "342th value should be 76");518assertEq(view[343], 255, "343th value should be 255");519assertEq(view[344], 154, "344th value should be 154");520assertEq(view[345], 255, "345th value should be 255");521assertEq(view[346], 101, "346th value should be 101");522assertEq(view[347], 255, "347th value should be 255");523assertEq(view[348], 154, "348th value should be 154");524assertEq(view[349], 255, "349th value should be 255");525assertEq(view[350], 101, "350th value should be 101");526assertEq(view[351], 255, "351th value should be 255");527assertEq(view[352], 128, "352th value should be 128");528assertEq(view[353], 127, "353th value should be 127");529assertEq(view[354], 127, "354th value should be 127");530assertEq(view[355], 255, "355th value should be 255");531assertEq(view[356], 52, "356th value should be 52");532assertEq(view[357], 255, "357th value should be 255");533assertEq(view[358], 203, "358th value should be 203");534assertEq(view[359], 255, "359th value should be 255");535assertEq(view[360], 0, "360th value should be 0");536assertEq(view[361], 0, "361th value should be 0");537assertEq(view[362], 0, "362th value should be 0");538assertEq(view[363], 255, "363th value should be 255");539assertEq(view[364], 0, "364th value should be 0");540assertEq(view[365], 0, "365th value should be 0");541assertEq(view[366], 0, "366th value should be 0");542assertEq(view[367], 255, "367th value should be 255");543assertEq(view[368], 0, "368th value should be 0");544assertEq(view[369], 0, "369th value should be 0");545assertEq(view[370], 0, "370th value should be 0");546assertEq(view[371], 255, "371th value should be 255");547assertEq(view[372], 0, "372th value should be 0");548assertEq(view[373], 0, "373th value should be 0");549assertEq(view[374], 0, "374th value should be 0");550assertEq(view[375], 255, "375th value should be 255");551assertEq(view[376], 0, "376th value should be 0");552assertEq(view[377], 0, "377th value should be 0");553assertEq(view[378], 0, "378th value should be 0");554assertEq(view[379], 255, "379th value should be 255");555assertEq(view[380], 0, "380th value should be 0");556assertEq(view[381], 0, "381th value should be 0");557assertEq(view[382], 0, "382th value should be 0");558assertEq(view[383], 255, "383th value should be 255");559assertEq(view[384], 52, "384th value should be 52");560assertEq(view[385], 255, "385th value should be 255");561assertEq(view[386], 203, "386th value should be 203");562assertEq(view[387], 255, "387th value should be 255");563assertEq(view[388], 179, "388th value should be 179");564assertEq(view[389], 127, "389th value should be 127");565assertEq(view[390], 76, "390th value should be 76");566assertEq(view[391], 255, "391th value should be 255");567assertEq(view[392], 205, "392th value should be 205");568assertEq(view[393], 255, "393th value should be 255");569assertEq(view[394], 50, "394th value should be 50");570assertEq(view[395], 255, "395th value should be 255");571assertEq(view[396], 205, "396th value should be 205");572assertEq(view[397], 255, "397th value should be 255");573assertEq(view[398], 50, "398th value should be 50");574assertEq(view[399], 255, "399th value should be 255");575assertEq(view[400], 205, "400th value should be 205");576assertEq(view[401], 255, "401th value should be 255");577assertEq(view[402], 50, "402th value should be 50");578assertEq(view[403], 255, "403th value should be 255");579assertEq(view[404], 205, "404th value should be 205");580assertEq(view[405], 255, "405th value should be 255");581assertEq(view[406], 50, "406th value should be 50");582assertEq(view[407], 255, "407th value should be 255");583assertEq(view[408], 205, "408th value should be 205");584assertEq(view[409], 255, "409th value should be 255");585assertEq(view[410], 50, "410th value should be 50");586assertEq(view[411], 255, "411th value should be 255");587assertEq(view[412], 205, "412th value should be 205");588assertEq(view[413], 255, "413th value should be 255");589assertEq(view[414], 50, "414th value should be 50");590assertEq(view[415], 255, "415th value should be 255");591assertEq(view[416], 154, "416th value should be 154");592assertEq(view[417], 255, "417th value should be 255");593assertEq(view[418], 101, "418th value should be 101");594assertEq(view[419], 255, "419th value should be 255");595assertEq(view[420], 128, "420th value should be 128");596assertEq(view[421], 127, "421th value should be 127");597assertEq(view[422], 127, "422th value should be 127");598assertEq(view[423], 255, "423th value should be 255");599assertEq(view[424], 154, "424th value should be 154");600assertEq(view[425], 255, "425th value should be 255");601assertEq(view[426], 101, "426th value should be 101");602assertEq(view[427], 255, "427th value should be 255");603assertEq(view[428], 128, "428th value should be 128");604assertEq(view[429], 127, "429th value should be 127");605assertEq(view[430], 127, "430th value should be 127");606assertEq(view[431], 255, "431th value should be 255");607assertEq(view[432], 103, "432th value should be 103");608assertEq(view[433], 255, "433th value should be 255");609assertEq(view[434], 152, "434th value should be 152");610assertEq(view[435], 255, "435th value should be 255");611assertEq(view[436], 0, "436th value should be 0");612assertEq(view[437], 0, "437th value should be 0");613assertEq(view[438], 0, "438th value should be 0");614assertEq(view[439], 255, "439th value should be 255");615assertEq(view[440], 0, "440th value should be 0");616assertEq(view[441], 0, "441th value should be 0");617assertEq(view[442], 0, "442th value should be 0");618assertEq(view[443], 255, "443th value should be 255");619assertEq(view[444], 0, "444th value should be 0");620assertEq(view[445], 0, "445th value should be 0");621assertEq(view[446], 0, "446th value should be 0");622assertEq(view[447], 255, "447th value should be 255");623assertEq(view[448], 0, "448th value should be 0");624assertEq(view[449], 0, "449th value should be 0");625assertEq(view[450], 0, "450th value should be 0");626assertEq(view[451], 255, "451th value should be 255");627assertEq(view[452], 0, "452th value should be 0");628assertEq(view[453], 0, "453th value should be 0");629assertEq(view[454], 0, "454th value should be 0");630assertEq(view[455], 255, "455th value should be 255");631assertEq(view[456], 0, "456th value should be 0");632assertEq(view[457], 0, "457th value should be 0");633assertEq(view[458], 0, "458th value should be 0");634assertEq(view[459], 255, "459th value should be 255");635assertEq(view[460], 0, "460th value should be 0");636assertEq(view[461], 0, "461th value should be 0");637assertEq(view[462], 0, "462th value should be 0");638assertEq(view[463], 255, "463th value should be 255");639assertEq(view[464], 78, "464th value should be 78");640assertEq(view[465], 127, "465th value should be 127");641assertEq(view[466], 178, "466th value should be 178");642assertEq(view[467], 255, "467th value should be 255");643assertEq(view[468], 154, "468th value should be 154");644assertEq(view[469], 255, "469th value should be 255");645assertEq(view[470], 101, "470th value should be 101");646assertEq(view[471], 255, "471th value should be 255");647assertEq(view[472], 205, "472th value should be 205");648assertEq(view[473], 255, "473th value should be 255");649assertEq(view[474], 50, "474th value should be 50");650assertEq(view[475], 255, "475th value should be 255");651assertEq(view[476], 205, "476th value should be 205");652assertEq(view[477], 255, "477th value should be 255");653assertEq(view[478], 50, "478th value should be 50");654assertEq(view[479], 255, "479th value should be 255");655assertEq(view[480], 205, "480th value should be 205");656assertEq(view[481], 255, "481th value should be 255");657assertEq(view[482], 50, "482th value should be 50");658assertEq(view[483], 255, "483th value should be 255");659assertEq(view[484], 205, "484th value should be 205");660assertEq(view[485], 255, "485th value should be 255");661assertEq(view[486], 50, "486th value should be 50");662assertEq(view[487], 255, "487th value should be 255");663assertEq(view[488], 179, "488th value should be 179");664assertEq(view[489], 127, "489th value should be 127");665assertEq(view[490], 76, "490th value should be 76");666assertEq(view[491], 255, "491th value should be 255");667assertEq(view[492], 179, "492th value should be 179");668assertEq(view[493], 127, "493th value should be 127");669assertEq(view[494], 76, "494th value should be 76");670assertEq(view[495], 255, "495th value should be 255");671assertEq(view[496], 128, "496th value should be 128");672assertEq(view[497], 127, "497th value should be 127");673assertEq(view[498], 127, "498th value should be 127");674assertEq(view[499], 255, "499th value should be 255");675assertEq(view[500], 52, "500th value should be 52");676assertEq(view[501], 255, "501th value should be 255");677assertEq(view[502], 203, "502th value should be 203");678assertEq(view[503], 255, "503th value should be 255");679assertEq(view[504], 0, "504th value should be 0");680assertEq(view[505], 0, "505th value should be 0");681assertEq(view[506], 0, "506th value should be 0");682assertEq(view[507], 255, "507th value should be 255");683assertEq(view[508], 78, "508th value should be 78");684assertEq(view[509], 127, "509th value should be 127");685assertEq(view[510], 178, "510th value should be 178");686assertEq(view[511], 255, "511th value should be 255");687assertEq(view[512], 52, "512th value should be 52");688assertEq(view[513], 255, "513th value should be 255");689assertEq(view[514], 203, "514th value should be 203");690assertEq(view[515], 255, "515th value should be 255");691assertEq(view[516], 0, "516th value should be 0");692assertEq(view[517], 0, "517th value should be 0");693assertEq(view[518], 0, "518th value should be 0");694assertEq(view[519], 255, "519th value should be 255");695assertEq(view[520], 0, "520th value should be 0");696assertEq(view[521], 0, "521th value should be 0");697assertEq(view[522], 0, "522th value should be 0");698assertEq(view[523], 255, "523th value should be 255");699assertEq(view[524], 0, "524th value should be 0");700assertEq(view[525], 0, "525th value should be 0");701assertEq(view[526], 0, "526th value should be 0");702assertEq(view[527], 255, "527th value should be 255");703assertEq(view[528], 0, "528th value should be 0");704assertEq(view[529], 0, "529th value should be 0");705assertEq(view[530], 0, "530th value should be 0");706assertEq(view[531], 255, "531th value should be 255");707assertEq(view[532], 0, "532th value should be 0");708assertEq(view[533], 0, "533th value should be 0");709assertEq(view[534], 0, "534th value should be 0");710assertEq(view[535], 255, "535th value should be 255");711assertEq(view[536], 0, "536th value should be 0");712assertEq(view[537], 0, "537th value should be 0");713assertEq(view[538], 0, "538th value should be 0");714assertEq(view[539], 255, "539th value should be 255");715assertEq(view[540], 0, "540th value should be 0");716assertEq(view[541], 0, "541th value should be 0");717assertEq(view[542], 0, "542th value should be 0");718assertEq(view[543], 255, "543th value should be 255");719assertEq(view[544], 0, "544th value should be 0");720assertEq(view[545], 0, "545th value should be 0");721assertEq(view[546], 0, "546th value should be 0");722assertEq(view[547], 255, "547th value should be 255");723assertEq(view[548], 154, "548th value should be 154");724assertEq(view[549], 255, "549th value should be 255");725assertEq(view[550], 101, "550th value should be 101");726assertEq(view[551], 255, "551th value should be 255");727assertEq(view[552], 205, "552th value should be 205");728assertEq(view[553], 255, "553th value should be 255");729assertEq(view[554], 50, "554th value should be 50");730assertEq(view[555], 255, "555th value should be 255");731assertEq(view[556], 205, "556th value should be 205");732assertEq(view[557], 255, "557th value should be 255");733assertEq(view[558], 50, "558th value should be 50");734assertEq(view[559], 255, "559th value should be 255");735assertEq(view[560], 205, "560th value should be 205");736assertEq(view[561], 255, "561th value should be 255");737assertEq(view[562], 50, "562th value should be 50");738assertEq(view[563], 255, "563th value should be 255");739assertEq(view[564], 179, "564th value should be 179");740assertEq(view[565], 127, "565th value should be 127");741assertEq(view[566], 76, "566th value should be 76");742assertEq(view[567], 255, "567th value should be 255");743assertEq(view[568], 179, "568th value should be 179");744assertEq(view[569], 127, "569th value should be 127");745assertEq(view[570], 76, "570th value should be 76");746assertEq(view[571], 255, "571th value should be 255");747assertEq(view[572], 154, "572th value should be 154");748assertEq(view[573], 255, "573th value should be 255");749assertEq(view[574], 101, "574th value should be 101");750assertEq(view[575], 255, "575th value should be 255");751assertEq(view[576], 103, "576th value should be 103");752assertEq(view[577], 255, "577th value should be 255");753assertEq(view[578], 152, "578th value should be 152");754assertEq(view[579], 255, "579th value should be 255");755assertEq(view[580], 0, "580th value should be 0");756assertEq(view[581], 0, "581th value should be 0");757assertEq(view[582], 0, "582th value should be 0");758assertEq(view[583], 255, "583th value should be 255");759assertEq(view[584], 0, "584th value should be 0");760assertEq(view[585], 0, "585th value should be 0");761assertEq(view[586], 0, "586th value should be 0");762assertEq(view[587], 255, "587th value should be 255");763assertEq(view[588], 0, "588th value should be 0");764assertEq(view[589], 0, "589th value should be 0");765assertEq(view[590], 0, "590th value should be 0");766assertEq(view[591], 255, "591th value should be 255");767assertEq(view[592], 0, "592th value should be 0");768assertEq(view[593], 0, "593th value should be 0");769assertEq(view[594], 0, "594th value should be 0");770assertEq(view[595], 255, "595th value should be 255");771assertEq(view[596], 0, "596th value should be 0");772assertEq(view[597], 0, "597th value should be 0");773assertEq(view[598], 0, "598th value should be 0");774assertEq(view[599], 255, "599th value should be 255");775assertEq(view[600], 0, "600th value should be 0");776assertEq(view[601], 0, "601th value should be 0");777assertEq(view[602], 0, "602th value should be 0");778assertEq(view[603], 255, "603th value should be 255");779assertEq(view[604], 0, "604th value should be 0");780assertEq(view[605], 0, "605th value should be 0");781assertEq(view[606], 0, "606th value should be 0");782assertEq(view[607], 255, "607th value should be 255");783assertEq(view[608], 0, "608th value should be 0");784assertEq(view[609], 0, "609th value should be 0");785assertEq(view[610], 0, "610th value should be 0");786assertEq(view[611], 255, "611th value should be 255");787assertEq(view[612], 0, "612th value should be 0");788assertEq(view[613], 0, "613th value should be 0");789assertEq(view[614], 0, "614th value should be 0");790assertEq(view[615], 255, "615th value should be 255");791assertEq(view[616], 0, "616th value should be 0");792assertEq(view[617], 0, "617th value should be 0");793assertEq(view[618], 0, "618th value should be 0");794assertEq(view[619], 255, "619th value should be 255");795assertEq(view[620], 0, "620th value should be 0");796assertEq(view[621], 0, "621th value should be 0");797assertEq(view[622], 0, "622th value should be 0");798assertEq(view[623], 255, "623th value should be 255");799assertEq(view[624], 0, "624th value should be 0");800assertEq(view[625], 0, "625th value should be 0");801assertEq(view[626], 0, "626th value should be 0");802assertEq(view[627], 255, "627th value should be 255");803assertEq(view[628], 154, "628th value should be 154");804assertEq(view[629], 255, "629th value should be 255");805assertEq(view[630], 101, "630th value should be 101");806assertEq(view[631], 255, "631th value should be 255");807assertEq(view[632], 205, "632th value should be 205");808assertEq(view[633], 255, "633th value should be 255");809assertEq(view[634], 50, "634th value should be 50");810assertEq(view[635], 255, "635th value should be 255");811assertEq(view[636], 205, "636th value should be 205");812assertEq(view[637], 255, "637th value should be 255");813assertEq(view[638], 50, "638th value should be 50");814assertEq(view[639], 255, "639th value should be 255");815assertEq(view[640], 179, "640th value should be 179");816assertEq(view[641], 127, "641th value should be 127");817assertEq(view[642], 76, "642th value should be 76");818assertEq(view[643], 255, "643th value should be 255");819assertEq(view[644], 179, "644th value should be 179");820assertEq(view[645], 127, "645th value should be 127");821assertEq(view[646], 76, "646th value should be 76");822assertEq(view[647], 255, "647th value should be 255");823assertEq(view[648], 154, "648th value should be 154");824assertEq(view[649], 255, "649th value should be 255");825assertEq(view[650], 101, "650th value should be 101");826assertEq(view[651], 255, "651th value should be 255");827assertEq(view[652], 128, "652th value should be 128");828assertEq(view[653], 127, "653th value should be 127");829assertEq(view[654], 127, "654th value should be 127");830assertEq(view[655], 255, "655th value should be 255");831assertEq(view[656], 52, "656th value should be 52");832assertEq(view[657], 255, "657th value should be 255");833assertEq(view[658], 203, "658th value should be 203");834assertEq(view[659], 255, "659th value should be 255");835assertEq(view[660], 0, "660th value should be 0");836assertEq(view[661], 0, "661th value should be 0");837assertEq(view[662], 0, "662th value should be 0");838assertEq(view[663], 255, "663th value should be 255");839assertEq(view[664], 0, "664th value should be 0");840assertEq(view[665], 0, "665th value should be 0");841assertEq(view[666], 0, "666th value should be 0");842assertEq(view[667], 255, "667th value should be 255");843assertEq(view[668], 0, "668th value should be 0");844assertEq(view[669], 0, "669th value should be 0");845assertEq(view[670], 0, "670th value should be 0");846assertEq(view[671], 255, "671th value should be 255");847assertEq(view[672], 0, "672th value should be 0");848assertEq(view[673], 0, "673th value should be 0");849assertEq(view[674], 0, "674th value should be 0");850assertEq(view[675], 255, "675th value should be 255");851assertEq(view[676], 0, "676th value should be 0");852assertEq(view[677], 0, "677th value should be 0");853assertEq(view[678], 0, "678th value should be 0");854assertEq(view[679], 255, "679th value should be 255");855assertEq(view[680], 0, "680th value should be 0");856assertEq(view[681], 0, "681th value should be 0");857assertEq(view[682], 0, "682th value should be 0");858assertEq(view[683], 255, "683th value should be 255");859assertEq(view[684], 0, "684th value should be 0");860assertEq(view[685], 0, "685th value should be 0");861assertEq(view[686], 0, "686th value should be 0");862assertEq(view[687], 255, "687th value should be 255");863assertEq(view[688], 0, "688th value should be 0");864assertEq(view[689], 0, "689th value should be 0");865assertEq(view[690], 0, "690th value should be 0");866assertEq(view[691], 255, "691th value should be 255");867assertEq(view[692], 0, "692th value should be 0");868assertEq(view[693], 0, "693th value should be 0");869assertEq(view[694], 0, "694th value should be 0");870assertEq(view[695], 255, "695th value should be 255");871assertEq(view[696], 0, "696th value should be 0");872assertEq(view[697], 0, "697th value should be 0");873assertEq(view[698], 0, "698th value should be 0");874assertEq(view[699], 255, "699th value should be 255");875assertEq(view[700], 0, "700th value should be 0");876assertEq(view[701], 0, "701th value should be 0");877assertEq(view[702], 0, "702th value should be 0");878assertEq(view[703], 255, "703th value should be 255");879assertEq(view[704], 0, "704th value should be 0");880assertEq(view[705], 0, "705th value should be 0");881assertEq(view[706], 0, "706th value should be 0");882assertEq(view[707], 255, "707th value should be 255");883assertEq(view[708], 154, "708th value should be 154");884assertEq(view[709], 255, "709th value should be 255");885assertEq(view[710], 101, "710th value should be 101");886assertEq(view[711], 255, "711th value should be 255");887assertEq(view[712], 179, "712th value should be 179");888assertEq(view[713], 127, "713th value should be 127");889assertEq(view[714], 76, "714th value should be 76");890assertEq(view[715], 255, "715th value should be 255");891assertEq(view[716], 205, "716th value should be 205");892assertEq(view[717], 255, "717th value should be 255");893assertEq(view[718], 50, "718th value should be 50");894assertEq(view[719], 255, "719th value should be 255");895assertEq(view[720], 154, "720th value should be 154");896assertEq(view[721], 255, "721th value should be 255");897assertEq(view[722], 101, "722th value should be 101");898assertEq(view[723], 255, "723th value should be 255");899assertEq(view[724], 52, "724th value should be 52");900assertEq(view[725], 255, "725th value should be 255");901assertEq(view[726], 203, "726th value should be 203");902assertEq(view[727], 255, "727th value should be 255");903assertEq(view[728], 128, "728th value should be 128");904assertEq(view[729], 127, "729th value should be 127");905assertEq(view[730], 127, "730th value should be 127");906assertEq(view[731], 255, "731th value should be 255");907assertEq(view[732], 78, "732th value should be 78");908assertEq(view[733], 127, "733th value should be 127");909assertEq(view[734], 178, "734th value should be 178");910assertEq(view[735], 255, "735th value should be 255");911assertEq(view[736], 0, "736th value should be 0");912assertEq(view[737], 0, "737th value should be 0");913assertEq(view[738], 0, "738th value should be 0");914assertEq(view[739], 255, "739th value should be 255");915assertEq(view[740], 0, "740th value should be 0");916assertEq(view[741], 0, "741th value should be 0");917assertEq(view[742], 0, "742th value should be 0");918assertEq(view[743], 255, "743th value should be 255");919assertEq(view[744], 0, "744th value should be 0");920assertEq(view[745], 0, "745th value should be 0");921assertEq(view[746], 0, "746th value should be 0");922assertEq(view[747], 255, "747th value should be 255");923assertEq(view[748], 0, "748th value should be 0");924assertEq(view[749], 0, "749th value should be 0");925assertEq(view[750], 0, "750th value should be 0");926assertEq(view[751], 255, "751th value should be 255");927assertEq(view[752], 0, "752th value should be 0");928assertEq(view[753], 0, "753th value should be 0");929assertEq(view[754], 0, "754th value should be 0");930assertEq(view[755], 255, "755th value should be 255");931assertEq(view[756], 0, "756th value should be 0");932assertEq(view[757], 0, "757th value should be 0");933assertEq(view[758], 0, "758th value should be 0");934assertEq(view[759], 255, "759th value should be 255");935assertEq(view[760], 0, "760th value should be 0");936assertEq(view[761], 0, "761th value should be 0");937assertEq(view[762], 0, "762th value should be 0");938assertEq(view[763], 255, "763th value should be 255");939assertEq(view[764], 0, "764th value should be 0");940assertEq(view[765], 0, "765th value should be 0");941assertEq(view[766], 0, "766th value should be 0");942assertEq(view[767], 255, "767th value should be 255");943assertEq(view[768], 0, "768th value should be 0");944assertEq(view[769], 0, "769th value should be 0");945assertEq(view[770], 0, "770th value should be 0");946assertEq(view[771], 255, "771th value should be 255");947assertEq(view[772], 0, "772th value should be 0");948assertEq(view[773], 0, "773th value should be 0");949assertEq(view[774], 0, "774th value should be 0");950assertEq(view[775], 255, "775th value should be 255");951assertEq(view[776], 0, "776th value should be 0");952assertEq(view[777], 0, "777th value should be 0");953assertEq(view[778], 0, "778th value should be 0");954assertEq(view[779], 255, "779th value should be 255");955assertEq(view[780], 0, "780th value should be 0");956assertEq(view[781], 0, "781th value should be 0");957assertEq(view[782], 0, "782th value should be 0");958assertEq(view[783], 255, "783th value should be 255");959assertEq(view[784], 78, "784th value should be 78");960assertEq(view[785], 127, "785th value should be 127");961assertEq(view[786], 178, "786th value should be 178");962assertEq(view[787], 255, "787th value should be 255");963assertEq(view[788], 154, "788th value should be 154");964assertEq(view[789], 255, "789th value should be 255");965assertEq(view[790], 101, "790th value should be 101");966assertEq(view[791], 255, "791th value should be 255");967assertEq(view[792], 179, "792th value should be 179");968assertEq(view[793], 127, "793th value should be 127");969assertEq(view[794], 76, "794th value should be 76");970assertEq(view[795], 255, "795th value should be 255");971assertEq(view[796], 205, "796th value should be 205");972assertEq(view[797], 255, "797th value should be 255");973assertEq(view[798], 50, "798th value should be 50");974assertEq(view[799], 255, "799th value should be 255");975assertEq(view[800], 128, "800th value should be 128");976assertEq(view[801], 127, "801th value should be 127");977assertEq(view[802], 127, "802th value should be 127");978assertEq(view[803], 255, "803th value should be 255");979assertEq(view[804], 0, "804th value should be 0");980assertEq(view[805], 0, "805th value should be 0");981assertEq(view[806], 0, "806th value should be 0");982assertEq(view[807], 255, "807th value should be 255");983assertEq(view[808], 26, "808th value should be 26");984assertEq(view[809], 127, "809th value should be 127");985assertEq(view[810], 229, "810th value should be 229");986assertEq(view[811], 255, "811th value should be 255");987assertEq(view[812], 0, "812th value should be 0");988assertEq(view[813], 0, "813th value should be 0");989assertEq(view[814], 0, "814th value should be 0");990assertEq(view[815], 255, "815th value should be 255");991assertEq(view[816], 0, "816th value should be 0");992assertEq(view[817], 0, "817th value should be 0");993assertEq(view[818], 0, "818th value should be 0");994assertEq(view[819], 255, "819th value should be 255");995assertEq(view[820], 0, "820th value should be 0");996assertEq(view[821], 0, "821th value should be 0");997assertEq(view[822], 0, "822th value should be 0");998assertEq(view[823], 255, "823th value should be 255");999assertEq(view[824], 0, "824th value should be 0");1000assertEq(view[825], 0, "825th value should be 0");1001assertEq(view[826], 0, "826th value should be 0");1002assertEq(view[827], 255, "827th value should be 255");1003assertEq(view[828], 0, "828th value should be 0");1004assertEq(view[829], 0, "829th value should be 0");1005assertEq(view[830], 0, "830th value should be 0");1006assertEq(view[831], 255, "831th value should be 255");1007assertEq(view[832], 0, "832th value should be 0");1008assertEq(view[833], 0, "833th value should be 0");1009assertEq(view[834], 0, "834th value should be 0");1010assertEq(view[835], 255, "835th value should be 255");1011assertEq(view[836], 0, "836th value should be 0");1012assertEq(view[837], 0, "837th value should be 0");1013assertEq(view[838], 0, "838th value should be 0");1014assertEq(view[839], 255, "839th value should be 255");1015assertEq(view[840], 0, "840th value should be 0");1016assertEq(view[841], 0, "841th value should be 0");1017assertEq(view[842], 0, "842th value should be 0");1018assertEq(view[843], 255, "843th value should be 255");1019assertEq(view[844], 0, "844th value should be 0");1020assertEq(view[845], 0, "845th value should be 0");1021assertEq(view[846], 0, "846th value should be 0");1022assertEq(view[847], 255, "847th value should be 255");1023assertEq(view[848], 0, "848th value should be 0");1024assertEq(view[849], 0, "849th value should be 0");1025assertEq(view[850], 0, "850th value should be 0");1026assertEq(view[851], 255, "851th value should be 255");1027assertEq(view[852], 0, "852th value should be 0");1028assertEq(view[853], 0, "853th value should be 0");1029assertEq(view[854], 0, "854th value should be 0");1030assertEq(view[855], 255, "855th value should be 255");1031assertEq(view[856], 0, "856th value should be 0");1032assertEq(view[857], 0, "857th value should be 0");1033assertEq(view[858], 0, "858th value should be 0");1034assertEq(view[859], 255, "859th value should be 255");1035assertEq(view[860], 0, "860th value should be 0");1036assertEq(view[861], 0, "861th value should be 0");1037assertEq(view[862], 0, "862th value should be 0");1038assertEq(view[863], 255, "863th value should be 255");1039assertEq(view[864], 103, "864th value should be 103");1040assertEq(view[865], 255, "865th value should be 255");1041assertEq(view[866], 152, "866th value should be 152");1042assertEq(view[867], 255, "867th value should be 255");1043assertEq(view[868], 154, "868th value should be 154");1044assertEq(view[869], 255, "869th value should be 255");1045assertEq(view[870], 101, "870th value should be 101");1046assertEq(view[871], 255, "871th value should be 255");1047assertEq(view[872], 179, "872th value should be 179");1048assertEq(view[873], 127, "873th value should be 127");1049assertEq(view[874], 76, "874th value should be 76");1050assertEq(view[875], 255, "875th value should be 255");1051assertEq(view[876], 205, "876th value should be 205");1052assertEq(view[877], 255, "877th value should be 255");1053assertEq(view[878], 50, "878th value should be 50");1054assertEq(view[879], 255, "879th value should be 255");1055assertEq(view[880], 179, "880th value should be 179");1056assertEq(view[881], 127, "881th value should be 127");1057assertEq(view[882], 76, "882th value should be 76");1058assertEq(view[883], 255, "883th value should be 255");1059assertEq(view[884], 179, "884th value should be 179");1060assertEq(view[885], 127, "885th value should be 127");1061assertEq(view[886], 76, "886th value should be 76");1062assertEq(view[887], 255, "887th value should be 255");1063assertEq(view[888], 128, "888th value should be 128");1064assertEq(view[889], 127, "889th value should be 127");1065assertEq(view[890], 127, "890th value should be 127");1066assertEq(view[891], 255, "891th value should be 255");1067assertEq(view[892], 103, "892th value should be 103");1068assertEq(view[893], 255, "893th value should be 255");1069assertEq(view[894], 152, "894th value should be 152");1070assertEq(view[895], 255, "895th value should be 255");1071assertEq(view[896], 26, "896th value should be 26");1072assertEq(view[897], 127, "897th value should be 127");1073assertEq(view[898], 229, "898th value should be 229");1074assertEq(view[899], 255, "899th value should be 255");1075assertEq(view[900], 0, "900th value should be 0");1076assertEq(view[901], 0, "901th value should be 0");1077assertEq(view[902], 0, "902th value should be 0");1078assertEq(view[903], 255, "903th value should be 255");1079assertEq(view[904], 0, "904th value should be 0");1080assertEq(view[905], 0, "905th value should be 0");1081assertEq(view[906], 0, "906th value should be 0");1082assertEq(view[907], 255, "907th value should be 255");1083assertEq(view[908], 0, "908th value should be 0");1084assertEq(view[909], 0, "909th value should be 0");1085assertEq(view[910], 0, "910th value should be 0");1086assertEq(view[911], 255, "911th value should be 255");1087assertEq(view[912], 0, "912th value should be 0");1088assertEq(view[913], 0, "913th value should be 0");1089assertEq(view[914], 0, "914th value should be 0");1090assertEq(view[915], 255, "915th value should be 255");1091assertEq(view[916], 0, "916th value should be 0");1092assertEq(view[917], 0, "917th value should be 0");1093assertEq(view[918], 0, "918th value should be 0");1094assertEq(view[919], 255, "919th value should be 255");1095assertEq(view[920], 0, "920th value should be 0");1096assertEq(view[921], 0, "921th value should be 0");1097assertEq(view[922], 0, "922th value should be 0");1098assertEq(view[923], 255, "923th value should be 255");1099assertEq(view[924], 0, "924th value should be 0");1100assertEq(view[925], 0, "925th value should be 0");1101assertEq(view[926], 0, "926th value should be 0");1102assertEq(view[927], 255, "927th value should be 255");1103assertEq(view[928], 0, "928th value should be 0");1104assertEq(view[929], 0, "929th value should be 0");1105assertEq(view[930], 0, "930th value should be 0");1106assertEq(view[931], 255, "931th value should be 255");1107assertEq(view[932], 0, "932th value should be 0");1108assertEq(view[933], 0, "933th value should be 0");1109assertEq(view[934], 0, "934th value should be 0");1110assertEq(view[935], 255, "935th value should be 255");1111assertEq(view[936], 0, "936th value should be 0");1112assertEq(view[937], 0, "937th value should be 0");1113assertEq(view[938], 0, "938th value should be 0");1114assertEq(view[939], 255, "939th value should be 255");1115assertEq(view[940], 0, "940th value should be 0");1116assertEq(view[941], 0, "941th value should be 0");1117assertEq(view[942], 0, "942th value should be 0");1118assertEq(view[943], 255, "943th value should be 255");1119assertEq(view[944], 0, "944th value should be 0");1120assertEq(view[945], 0, "945th value should be 0");1121assertEq(view[946], 0, "946th value should be 0");1122assertEq(view[947], 255, "947th value should be 255");1123assertEq(view[948], 154, "948th value should be 154");1124assertEq(view[949], 255, "949th value should be 255");1125assertEq(view[950], 101, "950th value should be 101");1126assertEq(view[951], 255, "951th value should be 255");1127assertEq(view[952], 179, "952th value should be 179");1128assertEq(view[953], 127, "953th value should be 127");1129assertEq(view[954], 76, "954th value should be 76");1130assertEq(view[955], 255, "955th value should be 255");1131assertEq(view[956], 205, "956th value should be 205");1132assertEq(view[957], 255, "957th value should be 255");1133assertEq(view[958], 50, "958th value should be 50");1134assertEq(view[959], 255, "959th value should be 255");1135assertEq(view[960], 179, "960th value should be 179");1136assertEq(view[961], 127, "961th value should be 127");1137assertEq(view[962], 76, "962th value should be 76");1138assertEq(view[963], 255, "963th value should be 255");1139assertEq(view[964], 179, "964th value should be 179");1140assertEq(view[965], 127, "965th value should be 127");1141assertEq(view[966], 76, "966th value should be 76");1142assertEq(view[967], 255, "967th value should be 255");1143assertEq(view[968], 179, "968th value should be 179");1144assertEq(view[969], 127, "969th value should be 127");1145assertEq(view[970], 76, "970th value should be 76");1146assertEq(view[971], 255, "971th value should be 255");1147assertEq(view[972], 154, "972th value should be 154");1148assertEq(view[973], 255, "973th value should be 255");1149assertEq(view[974], 101, "974th value should be 101");1150assertEq(view[975], 255, "975th value should be 255");1151assertEq(view[976], 103, "976th value should be 103");1152assertEq(view[977], 255, "977th value should be 255");1153assertEq(view[978], 152, "978th value should be 152");1154assertEq(view[979], 255, "979th value should be 255");1155assertEq(view[980], 0, "980th value should be 0");1156assertEq(view[981], 0, "981th value should be 0");1157assertEq(view[982], 0, "982th value should be 0");1158assertEq(view[983], 255, "983th value should be 255");1159assertEq(view[984], 0, "984th value should be 0");1160assertEq(view[985], 0, "985th value should be 0");1161assertEq(view[986], 0, "986th value should be 0");1162assertEq(view[987], 255, "987th value should be 255");1163assertEq(view[988], 0, "988th value should be 0");1164assertEq(view[989], 0, "989th value should be 0");1165assertEq(view[990], 0, "990th value should be 0");1166assertEq(view[991], 255, "991th value should be 255");1167assertEq(view[992], 0, "992th value should be 0");1168assertEq(view[993], 0, "993th value should be 0");1169assertEq(view[994], 0, "994th value should be 0");1170assertEq(view[995], 255, "995th value should be 255");1171assertEq(view[996], 0, "996th value should be 0");1172assertEq(view[997], 0, "997th value should be 0");1173assertEq(view[998], 0, "998th value should be 0");1174assertEq(view[999], 255, "999th value should be 255");1175assertEq(view[1000], 0, "1000th value should be 0");1176assertEq(view[1001], 0, "1001th value should be 0");1177assertEq(view[1002], 0, "1002th value should be 0");1178assertEq(view[1003], 255, "1003th value should be 255");1179assertEq(view[1004], 0, "1004th value should be 0");1180assertEq(view[1005], 0, "1005th value should be 0");1181assertEq(view[1006], 0, "1006th value should be 0");1182assertEq(view[1007], 255, "1007th value should be 255");1183assertEq(view[1008], 0, "1008th value should be 0");1184assertEq(view[1009], 0, "1009th value should be 0");1185assertEq(view[1010], 0, "1010th value should be 0");1186assertEq(view[1011], 255, "1011th value should be 255");1187assertEq(view[1012], 0, "1012th value should be 0");1188assertEq(view[1013], 0, "1013th value should be 0");1189assertEq(view[1014], 0, "1014th value should be 0");1190assertEq(view[1015], 255, "1015th value should be 255");1191assertEq(view[1016], 0, "1016th value should be 0");1192assertEq(view[1017], 0, "1017th value should be 0");1193assertEq(view[1018], 0, "1018th value should be 0");1194assertEq(view[1019], 255, "1019th value should be 255");1195assertEq(view[1020], 0, "1020th value should be 0");1196assertEq(view[1021], 0, "1021th value should be 0");1197assertEq(view[1022], 0, "1022th value should be 0");1198assertEq(view[1023], 255, "1023th value should be 255");1199assertEq(view[1024], 0, "1024th value should be 0");1200assertEq(view[1025], 0, "1025th value should be 0");1201assertEq(view[1026], 0, "1026th value should be 0");1202assertEq(view[1027], 255, "1027th value should be 255");1203assertEq(view[1028], 154, "1028th value should be 154");1204assertEq(view[1029], 255, "1029th value should be 255");1205assertEq(view[1030], 101, "1030th value should be 101");1206assertEq(view[1031], 255, "1031th value should be 255");1207assertEq(view[1032], 205, "1032th value should be 205");1208assertEq(view[1033], 255, "1033th value should be 255");1209assertEq(view[1034], 50, "1034th value should be 50");1210assertEq(view[1035], 255, "1035th value should be 255");1211assertEq(view[1036], 205, "1036th value should be 205");1212assertEq(view[1037], 255, "1037th value should be 255");1213assertEq(view[1038], 50, "1038th value should be 50");1214assertEq(view[1039], 255, "1039th value should be 255");1215assertEq(view[1040], 205, "1040th value should be 205");1216assertEq(view[1041], 255, "1041th value should be 255");1217assertEq(view[1042], 50, "1042th value should be 50");1218assertEq(view[1043], 255, "1043th value should be 255");1219assertEq(view[1044], 179, "1044th value should be 179");1220assertEq(view[1045], 127, "1045th value should be 127");1221assertEq(view[1046], 76, "1046th value should be 76");1222assertEq(view[1047], 255, "1047th value should be 255");1223assertEq(view[1048], 179, "1048th value should be 179");1224assertEq(view[1049], 127, "1049th value should be 127");1225assertEq(view[1050], 76, "1050th value should be 76");1226assertEq(view[1051], 255, "1051th value should be 255");1227assertEq(view[1052], 154, "1052th value should be 154");1228assertEq(view[1053], 255, "1053th value should be 255");1229assertEq(view[1054], 101, "1054th value should be 101");1230assertEq(view[1055], 255, "1055th value should be 255");1231assertEq(view[1056], 128, "1056th value should be 128");1232assertEq(view[1057], 127, "1057th value should be 127");1233assertEq(view[1058], 127, "1058th value should be 127");1234assertEq(view[1059], 255, "1059th value should be 255");1235assertEq(view[1060], 0, "1060th value should be 0");1236assertEq(view[1061], 0, "1061th value should be 0");1237assertEq(view[1062], 0, "1062th value should be 0");1238assertEq(view[1063], 255, "1063th value should be 255");1239assertEq(view[1064], 0, "1064th value should be 0");1240assertEq(view[1065], 0, "1065th value should be 0");1241assertEq(view[1066], 0, "1066th value should be 0");1242assertEq(view[1067], 255, "1067th value should be 255");1243assertEq(view[1068], 26, "1068th value should be 26");1244assertEq(view[1069], 127, "1069th value should be 127");1245assertEq(view[1070], 229, "1070th value should be 229");1246assertEq(view[1071], 255, "1071th value should be 255");1247assertEq(view[1072], 26, "1072th value should be 26");1248assertEq(view[1073], 127, "1073th value should be 127");1249assertEq(view[1074], 229, "1074th value should be 229");1250assertEq(view[1075], 255, "1075th value should be 255");1251assertEq(view[1076], 0, "1076th value should be 0");1252assertEq(view[1077], 0, "1077th value should be 0");1253assertEq(view[1078], 0, "1078th value should be 0");1254assertEq(view[1079], 255, "1079th value should be 255");1255assertEq(view[1080], 0, "1080th value should be 0");1256assertEq(view[1081], 0, "1081th value should be 0");1257assertEq(view[1082], 0, "1082th value should be 0");1258assertEq(view[1083], 255, "1083th value should be 255");1259assertEq(view[1084], 0, "1084th value should be 0");1260assertEq(view[1085], 0, "1085th value should be 0");1261assertEq(view[1086], 0, "1086th value should be 0");1262assertEq(view[1087], 255, "1087th value should be 255");1263assertEq(view[1088], 0, "1088th value should be 0");1264assertEq(view[1089], 0, "1089th value should be 0");1265assertEq(view[1090], 0, "1090th value should be 0");1266assertEq(view[1091], 255, "1091th value should be 255");1267assertEq(view[1092], 0, "1092th value should be 0");1268assertEq(view[1093], 0, "1093th value should be 0");1269assertEq(view[1094], 0, "1094th value should be 0");1270assertEq(view[1095], 255, "1095th value should be 255");1271assertEq(view[1096], 0, "1096th value should be 0");1272assertEq(view[1097], 0, "1097th value should be 0");1273assertEq(view[1098], 0, "1098th value should be 0");1274assertEq(view[1099], 255, "1099th value should be 255");1275assertEq(view[1100], 0, "1100th value should be 0");1276assertEq(view[1101], 0, "1101th value should be 0");1277assertEq(view[1102], 0, "1102th value should be 0");1278assertEq(view[1103], 255, "1103th value should be 255");1279assertEq(view[1104], 0, "1104th value should be 0");1280assertEq(view[1105], 0, "1105th value should be 0");1281assertEq(view[1106], 0, "1106th value should be 0");1282assertEq(view[1107], 255, "1107th value should be 255");1283assertEq(view[1108], 154, "1108th value should be 154");1284assertEq(view[1109], 255, "1109th value should be 255");1285assertEq(view[1110], 101, "1110th value should be 101");1286assertEq(view[1111], 255, "1111th value should be 255");1287assertEq(view[1112], 205, "1112th value should be 205");1288assertEq(view[1113], 255, "1113th value should be 255");1289assertEq(view[1114], 50, "1114th value should be 50");1290assertEq(view[1115], 255, "1115th value should be 255");1291assertEq(view[1116], 205, "1116th value should be 205");1292assertEq(view[1117], 255, "1117th value should be 255");1293assertEq(view[1118], 50, "1118th value should be 50");1294assertEq(view[1119], 255, "1119th value should be 255");1295assertEq(view[1120], 205, "1120th value should be 205");1296assertEq(view[1121], 255, "1121th value should be 255");1297assertEq(view[1122], 50, "1122th value should be 50");1298assertEq(view[1123], 255, "1123th value should be 255");1299assertEq(view[1124], 205, "1124th value should be 205");1300assertEq(view[1125], 255, "1125th value should be 255");1301assertEq(view[1126], 50, "1126th value should be 50");1302assertEq(view[1127], 255, "1127th value should be 255");1303assertEq(view[1128], 205, "1128th value should be 205");1304assertEq(view[1129], 255, "1129th value should be 255");1305assertEq(view[1130], 50, "1130th value should be 50");1306assertEq(view[1131], 255, "1131th value should be 255");1307assertEq(view[1132], 179, "1132th value should be 179");1308assertEq(view[1133], 127, "1133th value should be 127");1309assertEq(view[1134], 76, "1134th value should be 76");1310assertEq(view[1135], 255, "1135th value should be 255");1311assertEq(view[1136], 154, "1136th value should be 154");1312assertEq(view[1137], 255, "1137th value should be 255");1313assertEq(view[1138], 101, "1138th value should be 101");1314assertEq(view[1139], 255, "1139th value should be 255");1315assertEq(view[1140], 128, "1140th value should be 128");1316assertEq(view[1141], 127, "1141th value should be 127");1317assertEq(view[1142], 127, "1142th value should be 127");1318assertEq(view[1143], 255, "1143th value should be 255");1319assertEq(view[1144], 128, "1144th value should be 128");1320assertEq(view[1145], 127, "1145th value should be 127");1321assertEq(view[1146], 127, "1146th value should be 127");1322assertEq(view[1147], 255, "1147th value should be 255");1323assertEq(view[1148], 103, "1148th value should be 103");1324assertEq(view[1149], 255, "1149th value should be 255");1325assertEq(view[1150], 152, "1150th value should be 152");1326assertEq(view[1151], 255, "1151th value should be 255");1327assertEq(view[1152], 78, "1152th value should be 78");1328assertEq(view[1153], 127, "1153th value should be 127");1329assertEq(view[1154], 178, "1154th value should be 178");1330assertEq(view[1155], 255, "1155th value should be 255");1331assertEq(view[1156], 0, "1156th value should be 0");1332assertEq(view[1157], 0, "1157th value should be 0");1333assertEq(view[1158], 0, "1158th value should be 0");1334assertEq(view[1159], 255, "1159th value should be 255");1335assertEq(view[1160], 0, "1160th value should be 0");1336assertEq(view[1161], 0, "1161th value should be 0");1337assertEq(view[1162], 0, "1162th value should be 0");1338assertEq(view[1163], 255, "1163th value should be 255");1339assertEq(view[1164], 0, "1164th value should be 0");1340assertEq(view[1165], 0, "1165th value should be 0");1341assertEq(view[1166], 0, "1166th value should be 0");1342assertEq(view[1167], 255, "1167th value should be 255");1343assertEq(view[1168], 0, "1168th value should be 0");1344assertEq(view[1169], 0, "1169th value should be 0");1345assertEq(view[1170], 0, "1170th value should be 0");1346assertEq(view[1171], 255, "1171th value should be 255");1347assertEq(view[1172], 0, "1172th value should be 0");1348assertEq(view[1173], 0, "1173th value should be 0");1349assertEq(view[1174], 0, "1174th value should be 0");1350assertEq(view[1175], 255, "1175th value should be 255");1351assertEq(view[1176], 0, "1176th value should be 0");1352assertEq(view[1177], 0, "1177th value should be 0");1353assertEq(view[1178], 0, "1178th value should be 0");1354assertEq(view[1179], 255, "1179th value should be 255");1355assertEq(view[1180], 0, "1180th value should be 0");1356assertEq(view[1181], 0, "1181th value should be 0");1357assertEq(view[1182], 0, "1182th value should be 0");1358assertEq(view[1183], 255, "1183th value should be 255");1359assertEq(view[1184], 26, "1184th value should be 26");1360assertEq(view[1185], 127, "1185th value should be 127");1361assertEq(view[1186], 229, "1186th value should be 229");1362assertEq(view[1187], 255, "1187th value should be 255");1363assertEq(view[1188], 154, "1188th value should be 154");1364assertEq(view[1189], 255, "1189th value should be 255");1365assertEq(view[1190], 101, "1190th value should be 101");1366assertEq(view[1191], 255, "1191th value should be 255");1367assertEq(view[1192], 205, "1192th value should be 205");1368assertEq(view[1193], 255, "1193th value should be 255");1369assertEq(view[1194], 50, "1194th value should be 50");1370assertEq(view[1195], 255, "1195th value should be 255");1371assertEq(view[1196], 205, "1196th value should be 205");1372assertEq(view[1197], 255, "1197th value should be 255");1373assertEq(view[1198], 50, "1198th value should be 50");1374assertEq(view[1199], 255, "1199th value should be 255");1375assertEq(view[1200], 230, "1200th value should be 230");1376assertEq(view[1201], 127, "1201th value should be 127");1377assertEq(view[1202], 25, "1202th value should be 25");1378assertEq(view[1203], 255, "1203th value should be 255");1379assertEq(view[1204], 205, "1204th value should be 205");1380assertEq(view[1205], 255, "1205th value should be 255");1381assertEq(view[1206], 50, "1206th value should be 50");1382assertEq(view[1207], 255, "1207th value should be 255");1383assertEq(view[1208], 205, "1208th value should be 205");1384assertEq(view[1209], 255, "1209th value should be 255");1385assertEq(view[1210], 50, "1210th value should be 50");1386assertEq(view[1211], 255, "1211th value should be 255");1387assertEq(view[1212], 205, "1212th value should be 205");1388assertEq(view[1213], 255, "1213th value should be 255");1389assertEq(view[1214], 50, "1214th value should be 50");1390assertEq(view[1215], 255, "1215th value should be 255");1391assertEq(view[1216], 205, "1216th value should be 205");1392assertEq(view[1217], 255, "1217th value should be 255");1393assertEq(view[1218], 50, "1218th value should be 50");1394assertEq(view[1219], 255, "1219th value should be 255");1395assertEq(view[1220], 154, "1220th value should be 154");1396assertEq(view[1221], 255, "1221th value should be 255");1397assertEq(view[1222], 101, "1222th value should be 101");1398assertEq(view[1223], 255, "1223th value should be 255");1399assertEq(view[1224], 154, "1224th value should be 154");1400assertEq(view[1225], 255, "1225th value should be 255");1401assertEq(view[1226], 101, "1226th value should be 101");1402assertEq(view[1227], 255, "1227th value should be 255");1403assertEq(view[1228], 154, "1228th value should be 154");1404assertEq(view[1229], 255, "1229th value should be 255");1405assertEq(view[1230], 101, "1230th value should be 101");1406assertEq(view[1231], 255, "1231th value should be 255");1407assertEq(view[1232], 128, "1232th value should be 128");1408assertEq(view[1233], 127, "1233th value should be 127");1409assertEq(view[1234], 127, "1234th value should be 127");1410assertEq(view[1235], 255, "1235th value should be 255");1411assertEq(view[1236], 26, "1236th value should be 26");1412assertEq(view[1237], 127, "1237th value should be 127");1413assertEq(view[1238], 229, "1238th value should be 229");1414assertEq(view[1239], 255, "1239th value should be 255");1415assertEq(view[1240], 0, "1240th value should be 0");1416assertEq(view[1241], 0, "1241th value should be 0");1417assertEq(view[1242], 0, "1242th value should be 0");1418assertEq(view[1243], 255, "1243th value should be 255");1419assertEq(view[1244], 0, "1244th value should be 0");1420assertEq(view[1245], 0, "1245th value should be 0");1421assertEq(view[1246], 0, "1246th value should be 0");1422assertEq(view[1247], 255, "1247th value should be 255");1423assertEq(view[1248], 0, "1248th value should be 0");1424assertEq(view[1249], 0, "1249th value should be 0");1425assertEq(view[1250], 0, "1250th value should be 0");1426assertEq(view[1251], 255, "1251th value should be 255");1427assertEq(view[1252], 0, "1252th value should be 0");1428assertEq(view[1253], 0, "1253th value should be 0");1429assertEq(view[1254], 0, "1254th value should be 0");1430assertEq(view[1255], 255, "1255th value should be 255");1431assertEq(view[1256], 0, "1256th value should be 0");1432assertEq(view[1257], 0, "1257th value should be 0");1433assertEq(view[1258], 0, "1258th value should be 0");1434assertEq(view[1259], 255, "1259th value should be 255");1435assertEq(view[1260], 0, "1260th value should be 0");1436assertEq(view[1261], 0, "1261th value should be 0");1437assertEq(view[1262], 0, "1262th value should be 0");1438assertEq(view[1263], 255, "1263th value should be 255");1439assertEq(view[1264], 78, "1264th value should be 78");1440assertEq(view[1265], 127, "1265th value should be 127");1441assertEq(view[1266], 178, "1266th value should be 178");1442assertEq(view[1267], 255, "1267th value should be 255");1443assertEq(view[1268], 179, "1268th value should be 179");1444assertEq(view[1269], 127, "1269th value should be 127");1445assertEq(view[1270], 76, "1270th value should be 76");1446assertEq(view[1271], 255, "1271th value should be 255");1447assertEq(view[1272], 205, "1272th value should be 205");1448assertEq(view[1273], 255, "1273th value should be 255");1449assertEq(view[1274], 50, "1274th value should be 50");1450assertEq(view[1275], 255, "1275th value should be 255");1451assertEq(view[1276], 205, "1276th value should be 205");1452assertEq(view[1277], 255, "1277th value should be 255");1453assertEq(view[1278], 50, "1278th value should be 50");1454assertEq(view[1279], 255, "1279th value should be 255");1455assertEq(view[1280], 0, "1280th value should be 0");1456assertEq(view[1281], 0, "1281th value should be 0");1457assertEq(view[1282], 0, "1282th value should be 0");1458assertEq(view[1283], 255, "1283th value should be 255");1459assertEq(view[1284], 205, "1284th value should be 205");1460assertEq(view[1285], 255, "1285th value should be 255");1461assertEq(view[1286], 50, "1286th value should be 50");1462assertEq(view[1287], 255, "1287th value should be 255");1463assertEq(view[1288], 205, "1288th value should be 205");1464assertEq(view[1289], 255, "1289th value should be 255");1465assertEq(view[1290], 50, "1290th value should be 50");1466assertEq(view[1291], 255, "1291th value should be 255");1467assertEq(view[1292], 205, "1292th value should be 205");1468assertEq(view[1293], 255, "1293th value should be 255");1469assertEq(view[1294], 50, "1294th value should be 50");1470assertEq(view[1295], 255, "1295th value should be 255");1471assertEq(view[1296], 205, "1296th value should be 205");1472assertEq(view[1297], 255, "1297th value should be 255");1473assertEq(view[1298], 50, "1298th value should be 50");1474assertEq(view[1299], 255, "1299th value should be 255");1475assertEq(view[1300], 205, "1300th value should be 205");1476assertEq(view[1301], 255, "1301th value should be 255");1477assertEq(view[1302], 50, "1302th value should be 50");1478assertEq(view[1303], 255, "1303th value should be 255");1479assertEq(view[1304], 179, "1304th value should be 179");1480assertEq(view[1305], 127, "1305th value should be 127");1481assertEq(view[1306], 76, "1306th value should be 76");1482assertEq(view[1307], 255, "1307th value should be 255");1483assertEq(view[1308], 154, "1308th value should be 154");1484assertEq(view[1309], 255, "1309th value should be 255");1485assertEq(view[1310], 101, "1310th value should be 101");1486assertEq(view[1311], 255, "1311th value should be 255");1487assertEq(view[1312], 154, "1312th value should be 154");1488assertEq(view[1313], 255, "1313th value should be 255");1489assertEq(view[1314], 101, "1314th value should be 101");1490assertEq(view[1315], 255, "1315th value should be 255");1491assertEq(view[1316], 0, "1316th value should be 0");1492assertEq(view[1317], 0, "1317th value should be 0");1493assertEq(view[1318], 0, "1318th value should be 0");1494assertEq(view[1319], 255, "1319th value should be 255");1495assertEq(view[1320], 0, "1320th value should be 0");1496assertEq(view[1321], 0, "1321th value should be 0");1497assertEq(view[1322], 0, "1322th value should be 0");1498assertEq(view[1323], 255, "1323th value should be 255");1499assertEq(view[1324], 0, "1324th value should be 0");1500assertEq(view[1325], 0, "1325th value should be 0");1501assertEq(view[1326], 0, "1326th value should be 0");1502assertEq(view[1327], 255, "1327th value should be 255");1503assertEq(view[1328], 0, "1328th value should be 0");1504assertEq(view[1329], 0, "1329th value should be 0");1505assertEq(view[1330], 0, "1330th value should be 0");1506assertEq(view[1331], 255, "1331th value should be 255");1507assertEq(view[1332], 0, "1332th value should be 0");1508assertEq(view[1333], 0, "1333th value should be 0");1509assertEq(view[1334], 0, "1334th value should be 0");1510assertEq(view[1335], 255, "1335th value should be 255");1511assertEq(view[1336], 0, "1336th value should be 0");1512assertEq(view[1337], 0, "1337th value should be 0");1513assertEq(view[1338], 0, "1338th value should be 0");1514assertEq(view[1339], 255, "1339th value should be 255");1515assertEq(view[1340], 0, "1340th value should be 0");1516assertEq(view[1341], 0, "1341th value should be 0");1517assertEq(view[1342], 0, "1342th value should be 0");1518assertEq(view[1343], 255, "1343th value should be 255");1519assertEq(view[1344], 0, "1344th value should be 0");1520assertEq(view[1345], 0, "1345th value should be 0");1521assertEq(view[1346], 0, "1346th value should be 0");1522assertEq(view[1347], 255, "1347th value should be 255");1523assertEq(view[1348], 179, "1348th value should be 179");1524assertEq(view[1349], 127, "1349th value should be 127");1525assertEq(view[1350], 76, "1350th value should be 76");1526assertEq(view[1351], 255, "1351th value should be 255");1527assertEq(view[1352], 205, "1352th value should be 205");1528assertEq(view[1353], 255, "1353th value should be 255");1529assertEq(view[1354], 50, "1354th value should be 50");1530assertEq(view[1355], 255, "1355th value should be 255");1531assertEq(view[1356], 205, "1356th value should be 205");1532assertEq(view[1357], 255, "1357th value should be 255");1533assertEq(view[1358], 50, "1358th value should be 50");1534assertEq(view[1359], 255, "1359th value should be 255");1535assertEq(view[1360], 0, "1360th value should be 0");1536assertEq(view[1361], 0, "1361th value should be 0");1537assertEq(view[1362], 0, "1362th value should be 0");1538assertEq(view[1363], 255, "1363th value should be 255");1539assertEq(view[1364], 205, "1364th value should be 205");1540assertEq(view[1365], 255, "1365th value should be 255");1541assertEq(view[1366], 50, "1366th value should be 50");1542assertEq(view[1367], 255, "1367th value should be 255");1543assertEq(view[1368], 205, "1368th value should be 205");1544assertEq(view[1369], 255, "1369th value should be 255");1545assertEq(view[1370], 50, "1370th value should be 50");1546assertEq(view[1371], 255, "1371th value should be 255");1547assertEq(view[1372], 205, "1372th value should be 205");1548assertEq(view[1373], 255, "1373th value should be 255");1549assertEq(view[1374], 50, "1374th value should be 50");1550assertEq(view[1375], 255, "1375th value should be 255");1551assertEq(view[1376], 205, "1376th value should be 205");1552assertEq(view[1377], 255, "1377th value should be 255");1553assertEq(view[1378], 50, "1378th value should be 50");1554assertEq(view[1379], 255, "1379th value should be 255");1555assertEq(view[1380], 205, "1380th value should be 205");1556assertEq(view[1381], 255, "1381th value should be 255");1557assertEq(view[1382], 50, "1382th value should be 50");1558assertEq(view[1383], 255, "1383th value should be 255");1559assertEq(view[1384], 205, "1384th value should be 205");1560assertEq(view[1385], 255, "1385th value should be 255");1561assertEq(view[1386], 50, "1386th value should be 50");1562assertEq(view[1387], 255, "1387th value should be 255");1563assertEq(view[1388], 179, "1388th value should be 179");1564assertEq(view[1389], 127, "1389th value should be 127");1565assertEq(view[1390], 76, "1390th value should be 76");1566assertEq(view[1391], 255, "1391th value should be 255");1567assertEq(view[1392], 179, "1392th value should be 179");1568assertEq(view[1393], 127, "1393th value should be 127");1569assertEq(view[1394], 76, "1394th value should be 76");1570assertEq(view[1395], 255, "1395th value should be 255");1571assertEq(view[1396], 103, "1396th value should be 103");1572assertEq(view[1397], 255, "1397th value should be 255");1573assertEq(view[1398], 152, "1398th value should be 152");1574assertEq(view[1399], 255, "1399th value should be 255");1575assertEq(view[1400], 78, "1400th value should be 78");1576assertEq(view[1401], 127, "1401th value should be 127");1577assertEq(view[1402], 178, "1402th value should be 178");1578assertEq(view[1403], 255, "1403th value should be 255");1579assertEq(view[1404], 52, "1404th value should be 52");1580assertEq(view[1405], 255, "1405th value should be 255");1581assertEq(view[1406], 203, "1406th value should be 203");1582assertEq(view[1407], 255, "1407th value should be 255");1583assertEq(view[1408], 0, "1408th value should be 0");1584assertEq(view[1409], 0, "1409th value should be 0");1585assertEq(view[1410], 0, "1410th value should be 0");1586assertEq(view[1411], 255, "1411th value should be 255");1587assertEq(view[1412], 0, "1412th value should be 0");1588assertEq(view[1413], 0, "1413th value should be 0");1589assertEq(view[1414], 0, "1414th value should be 0");1590assertEq(view[1415], 255, "1415th value should be 255");1591assertEq(view[1416], 52, "1416th value should be 52");1592assertEq(view[1417], 255, "1417th value should be 255");1593assertEq(view[1418], 203, "1418th value should be 203");1594assertEq(view[1419], 255, "1419th value should be 255");1595assertEq(view[1420], 128, "1420th value should be 128");1596assertEq(view[1421], 127, "1421th value should be 127");1597assertEq(view[1422], 127, "1422th value should be 127");1598assertEq(view[1423], 255, "1423th value should be 255");1599assertEq(view[1424], 128, "1424th value should be 128");1600assertEq(view[1425], 127, "1425th value should be 127");1601assertEq(view[1426], 127, "1426th value should be 127");1602assertEq(view[1427], 255, "1427th value should be 255");1603assertEq(view[1428], 205, "1428th value should be 205");1604assertEq(view[1429], 255, "1429th value should be 255");1605assertEq(view[1430], 50, "1430th value should be 50");1606assertEq(view[1431], 255, "1431th value should be 255");1607assertEq(view[1432], 205, "1432th value should be 205");1608assertEq(view[1433], 255, "1433th value should be 255");1609assertEq(view[1434], 50, "1434th value should be 50");1610assertEq(view[1435], 255, "1435th value should be 255");1611assertEq(view[1436], 230, "1436th value should be 230");1612assertEq(view[1437], 127, "1437th value should be 127");1613assertEq(view[1438], 25, "1438th value should be 25");1614assertEq(view[1439], 255, "1439th value should be 255");1615assertEq(view[1440], 0, "1440th value should be 0");1616assertEq(view[1441], 0, "1441th value should be 0");1617assertEq(view[1442], 0, "1442th value should be 0");1618assertEq(view[1443], 255, "1443th value should be 255");1619assertEq(view[1444], 230, "1444th value should be 230");1620assertEq(view[1445], 127, "1445th value should be 127");1621assertEq(view[1446], 25, "1446th value should be 25");1622assertEq(view[1447], 255, "1447th value should be 255");1623assertEq(view[1448], 205, "1448th value should be 205");1624assertEq(view[1449], 255, "1449th value should be 255");1625assertEq(view[1450], 50, "1450th value should be 50");1626assertEq(view[1451], 255, "1451th value should be 255");1627assertEq(view[1452], 205, "1452th value should be 205");1628assertEq(view[1453], 255, "1453th value should be 255");1629assertEq(view[1454], 50, "1454th value should be 50");1630assertEq(view[1455], 255, "1455th value should be 255");1631assertEq(view[1456], 205, "1456th value should be 205");1632assertEq(view[1457], 255, "1457th value should be 255");1633assertEq(view[1458], 50, "1458th value should be 50");1634assertEq(view[1459], 255, "1459th value should be 255");1635assertEq(view[1460], 205, "1460th value should be 205");1636assertEq(view[1461], 255, "1461th value should be 255");1637assertEq(view[1462], 50, "1462th value should be 50");1638assertEq(view[1463], 255, "1463th value should be 255");1639assertEq(view[1464], 205, "1464th value should be 205");1640assertEq(view[1465], 255, "1465th value should be 255");1641assertEq(view[1466], 50, "1466th value should be 50");1642assertEq(view[1467], 255, "1467th value should be 255");1643assertEq(view[1468], 179, "1468th value should be 179");1644assertEq(view[1469], 127, "1469th value should be 127");1645assertEq(view[1470], 76, "1470th value should be 76");1646assertEq(view[1471], 255, "1471th value should be 255");1647assertEq(view[1472], 179, "1472th value should be 179");1648assertEq(view[1473], 127, "1473th value should be 127");1649assertEq(view[1474], 76, "1474th value should be 76");1650assertEq(view[1475], 255, "1475th value should be 255");1651assertEq(view[1476], 179, "1476th value should be 179");1652assertEq(view[1477], 127, "1477th value should be 127");1653assertEq(view[1478], 76, "1478th value should be 76");1654assertEq(view[1479], 255, "1479th value should be 255");1655assertEq(view[1480], 128, "1480th value should be 128");1656assertEq(view[1481], 127, "1481th value should be 127");1657assertEq(view[1482], 127, "1482th value should be 127");1658assertEq(view[1483], 255, "1483th value should be 255");1659assertEq(view[1484], 103, "1484th value should be 103");1660assertEq(view[1485], 255, "1485th value should be 255");1661assertEq(view[1486], 152, "1486th value should be 152");1662assertEq(view[1487], 255, "1487th value should be 255");1663assertEq(view[1488], 0, "1488th value should be 0");1664assertEq(view[1489], 0, "1489th value should be 0");1665assertEq(view[1490], 0, "1490th value should be 0");1666assertEq(view[1491], 255, "1491th value should be 255");1667assertEq(view[1492], 0, "1492th value should be 0");1668assertEq(view[1493], 0, "1493th value should be 0");1669assertEq(view[1494], 0, "1494th value should be 0");1670assertEq(view[1495], 255, "1495th value should be 255");1671assertEq(view[1496], 128, "1496th value should be 128");1672assertEq(view[1497], 127, "1497th value should be 127");1673assertEq(view[1498], 127, "1498th value should be 127");1674assertEq(view[1499], 255, "1499th value should be 255");1675assertEq(view[1500], 154, "1500th value should be 154");1676assertEq(view[1501], 255, "1501th value should be 255");1677assertEq(view[1502], 101, "1502th value should be 101");1678assertEq(view[1503], 255, "1503th value should be 255");1679assertEq(view[1504], 179, "1504th value should be 179");1680assertEq(view[1505], 127, "1505th value should be 127");1681assertEq(view[1506], 76, "1506th value should be 76");1682assertEq(view[1507], 255, "1507th value should be 255");1683assertEq(view[1508], 205, "1508th value should be 205");1684assertEq(view[1509], 255, "1509th value should be 255");1685assertEq(view[1510], 50, "1510th value should be 50");1686assertEq(view[1511], 255, "1511th value should be 255");1687assertEq(view[1512], 205, "1512th value should be 205");1688assertEq(view[1513], 255, "1513th value should be 255");1689assertEq(view[1514], 50, "1514th value should be 50");1690assertEq(view[1515], 255, "1515th value should be 255");1691assertEq(view[1516], 230, "1516th value should be 230");1692assertEq(view[1517], 127, "1517th value should be 127");1693assertEq(view[1518], 25, "1518th value should be 25");1694assertEq(view[1519], 255, "1519th value should be 255");1695assertEq(view[1520], 0, "1520th value should be 0");1696assertEq(view[1521], 0, "1521th value should be 0");1697assertEq(view[1522], 0, "1522th value should be 0");1698assertEq(view[1523], 255, "1523th value should be 255");1699assertEq(view[1524], 230, "1524th value should be 230");1700assertEq(view[1525], 127, "1525th value should be 127");1701assertEq(view[1526], 25, "1526th value should be 25");1702assertEq(view[1527], 255, "1527th value should be 255");1703assertEq(view[1528], 230, "1528th value should be 230");1704assertEq(view[1529], 127, "1529th value should be 127");1705assertEq(view[1530], 25, "1530th value should be 25");1706assertEq(view[1531], 255, "1531th value should be 255");1707assertEq(view[1532], 205, "1532th value should be 205");1708assertEq(view[1533], 255, "1533th value should be 255");1709assertEq(view[1534], 50, "1534th value should be 50");1710assertEq(view[1535], 255, "1535th value should be 255");1711assertEq(view[1536], 205, "1536th value should be 205");1712assertEq(view[1537], 255, "1537th value should be 255");1713assertEq(view[1538], 50, "1538th value should be 50");1714assertEq(view[1539], 255, "1539th value should be 255");1715assertEq(view[1540], 205, "1540th value should be 205");1716assertEq(view[1541], 255, "1541th value should be 255");1717assertEq(view[1542], 50, "1542th value should be 50");1718assertEq(view[1543], 255, "1543th value should be 255");1719assertEq(view[1544], 205, "1544th value should be 205");1720assertEq(view[1545], 255, "1545th value should be 255");1721assertEq(view[1546], 50, "1546th value should be 50");1722assertEq(view[1547], 255, "1547th value should be 255");1723assertEq(view[1548], 205, "1548th value should be 205");1724assertEq(view[1549], 255, "1549th value should be 255");1725assertEq(view[1550], 50, "1550th value should be 50");1726assertEq(view[1551], 255, "1551th value should be 255");1727assertEq(view[1552], 179, "1552th value should be 179");1728assertEq(view[1553], 127, "1553th value should be 127");1729assertEq(view[1554], 76, "1554th value should be 76");1730assertEq(view[1555], 255, "1555th value should be 255");1731assertEq(view[1556], 179, "1556th value should be 179");1732assertEq(view[1557], 127, "1557th value should be 127");1733assertEq(view[1558], 76, "1558th value should be 76");1734assertEq(view[1559], 255, "1559th value should be 255");1735assertEq(view[1560], 179, "1560th value should be 179");1736assertEq(view[1561], 127, "1561th value should be 127");1737assertEq(view[1562], 76, "1562th value should be 76");1738assertEq(view[1563], 255, "1563th value should be 255");1739assertEq(view[1564], 154, "1564th value should be 154");1740assertEq(view[1565], 255, "1565th value should be 255");1741assertEq(view[1566], 101, "1566th value should be 101");1742assertEq(view[1567], 255, "1567th value should be 255");1743assertEq(view[1568], 26, "1568th value should be 26");1744assertEq(view[1569], 127, "1569th value should be 127");1745assertEq(view[1570], 229, "1570th value should be 229");1746assertEq(view[1571], 255, "1571th value should be 255");1747assertEq(view[1572], 0, "1572th value should be 0");1748assertEq(view[1573], 0, "1573th value should be 0");1749assertEq(view[1574], 0, "1574th value should be 0");1750assertEq(view[1575], 255, "1575th value should be 255");1751assertEq(view[1576], 154, "1576th value should be 154");1752assertEq(view[1577], 255, "1577th value should be 255");1753assertEq(view[1578], 101, "1578th value should be 101");1754assertEq(view[1579], 255, "1579th value should be 255");1755assertEq(view[1580], 179, "1580th value should be 179");1756assertEq(view[1581], 127, "1581th value should be 127");1757assertEq(view[1582], 76, "1582th value should be 76");1758assertEq(view[1583], 255, "1583th value should be 255");1759assertEq(view[1584], 205, "1584th value should be 205");1760assertEq(view[1585], 255, "1585th value should be 255");1761assertEq(view[1586], 50, "1586th value should be 50");1762assertEq(view[1587], 255, "1587th value should be 255");1763assertEq(view[1588], 205, "1588th value should be 205");1764assertEq(view[1589], 255, "1589th value should be 255");1765assertEq(view[1590], 50, "1590th value should be 50");1766assertEq(view[1591], 255, "1591th value should be 255");1767assertEq(view[1592], 230, "1592th value should be 230");1768assertEq(view[1593], 127, "1593th value should be 127");1769assertEq(view[1594], 25, "1594th value should be 25");1770assertEq(view[1595], 255, "1595th value should be 255");1771assertEq(view[1596], 230, "1596th value should be 230");1772assertEq(view[1597], 127, "1597th value should be 127");1773assertEq(view[1598], 25, "1598th value should be 25");1774assertEq(view[1599], 255, "1599th value should be 255");1775// Code used to generate the assertEq list above.1776function generateAssertList() {1777 function template(i, x) {1778 return 'assertEq(view[' + i + '], ' + x + ', "' + i + 'th value should be ' + x + '");\n';1779 }1780 var buf = ''1781 for (var i = 0; i < LIMIT_SHOW; i++)1782 buf += template(i, view[i]);1783 print(buf);1784}...
Number.js
Source:Number.js
1shouldBe("Number()", "0");2shouldBe("Number(1)", "1");3shouldBe("Number(1.1)", "1.1");4shouldBe("Number('1.2')", "1.2");5shouldBe("isNaN(Number('a'))", "true");6shouldBe("(new Number()).valueOf()", "0");7shouldBe("(new Number(.4)).valueOf()", "0.4");8shouldBe("(new Number('1.')).valueOf()", "1");9shouldBe("isNaN(new Number('a'))", "true");10shouldBe("isNaN(Number.NaN)", "true");11shouldBe("Number.NEGATIVE_INFINITY", "-Infinity");12shouldBe("Number.POSITIVE_INFINITY", "Infinity");13shouldBe("(1).toString()", "'1'");14shouldBe("typeof (1).toString()", "'string'");15shouldBe("(10).toString(16)", "'a'");16shouldBe("(8.5).toString(16)", "'8.8'");17shouldBe("(-8.5).toString(16)", "'-8.8'");18shouldBe("Number.NaN.toString(16)", "'NaN'");19shouldBe("Number.POSITIVE_INFINITY.toString(16)", "'Infinity'");20shouldBe("Number.NEGATIVE_INFINITY.toString(16)", "'-Infinity'");21shouldBe("Number.MAX_VALUE.toString(2).length", "1024");22shouldBe("(1).valueOf()", "1");23shouldBe("typeof (1).valueOf()", "'number'");24function toFixedOrException(val,fractionDigits)25{26 var s = "";27 try {28 s = String(Number(val).toFixed(fractionDigits));29 }30 catch (e) {31 s = String(e);32 }33 return s;34}35shouldBe("Number(1234.567).toFixed(0)","\"1235\"");36shouldBe("Number(1234.567).toFixed(undefined)","\"1235\"");37shouldBe("Number(-1234.567).toFixed(0)","\"-1235\"");38shouldBe("Number(-1234.567).toFixed(undefined)","\"-1235\"");39shouldBe("Number(0).toFixed(7)","\"0.0000000\"");40shouldBe("Number(0.003).toFixed(0)","\"0\"");41shouldBe("Number(-0.003).toFixed(0)","\"-0\"");42shouldBe("Number(40.1234567890123).toFixed(7)","\"40.1234568\"");43shouldBe("Number(-40.1234567890123).toFixed(7)","\"-40.1234568\"");44shouldBe("Number(4).toFixed(7)","\"4.0000000\"");45shouldBe("Number(-4).toFixed(7)","\"-4.0000000\"");46shouldBe("Number(0.000056).toFixed(7)","\"0.0000560\"");47shouldBe("Number(-0.000056).toFixed(7)","\"-0.0000560\"");48shouldBe("Number(NaN).toFixed(7)","\"NaN\"");49shouldBe("Number(Infinity).toFixed(7)","\"Infinity\"");50shouldBe("Number(-Infinity).toFixed(7)","\"-Infinity\"");51shouldBe("Number(Math.pow(10,4)).toFixed(13)","\"10000.0000000000000\"");52shouldBe("Number(Math.pow(10,17)).toFixed(16)","\"100000000000000000.0000000000000000\"");53shouldBe("Number(Math.pow(10,18)).toFixed(17)","\"1000000000000000000.00000000000000000\"");54shouldBe("Number(Math.pow(10,19)).toFixed(18)","\"10000000000000000000.000000000000000000\"");55shouldBe("Number(Math.pow(10,17)).toFixed(20)","\"100000000000000000.00000000000000000000\"");56shouldBe("Number(Math.pow(10,18)).toFixed(20)","\"1000000000000000000.00000000000000000000\"");57shouldBe("Number(Math.pow(10,19)).toFixed(20)","\"10000000000000000000.00000000000000000000\"");58shouldBe("Number(Math.pow(10,20)).toFixed(20)","\"100000000000000000000.00000000000000000000\"");59shouldBe("Number(Math.pow(10,21)).toFixed(20)","\"1e+21\"");60shouldBe("Number(-Math.pow(10,4)).toFixed(13)","\"-10000.0000000000000\"");61shouldBe("Number(-Math.pow(10,17)).toFixed(16)","\"-100000000000000000.0000000000000000\"");62shouldBe("Number(-Math.pow(10,18)).toFixed(17)","\"-1000000000000000000.00000000000000000\"");63shouldBe("Number(-Math.pow(10,19)).toFixed(18)","\"-10000000000000000000.000000000000000000\"");64shouldBe("Number(-Math.pow(10,17)).toFixed(20)","\"-100000000000000000.00000000000000000000\"");65shouldBe("Number(-Math.pow(10,18)).toFixed(20)","\"-1000000000000000000.00000000000000000000\"");66shouldBe("Number(-Math.pow(10,19)).toFixed(20)","\"-10000000000000000000.00000000000000000000\"");67shouldBe("Number(-Math.pow(10,20)).toFixed(20)","\"-100000000000000000000.00000000000000000000\"");68shouldBe("Number(-Math.pow(10,21)).toFixed(20)","\"-1e+21\"");69shouldBeTrue("toFixedOrException(2,-1).indexOf('Range') >= 0");70shouldBe("Number(2).toFixed(0)","\"2\"");71shouldBe("Number(2).toFixed(20)","\"2.00000000000000000000\"");72shouldBeTrue("toFixedOrException(2,21).indexOf('Range') >= 0");73shouldBeTrue("toFixedOrException(-2,-1).indexOf('Range') >= 0");74shouldBe("Number(-2).toFixed(0)","\"-2\"");75shouldBe("Number(-2).toFixed(20)","\"-2.00000000000000000000\"");76shouldBeTrue("toFixedOrException(-2,21).indexOf('Range') >= 0");77shouldBe("Number(NaN).toExponential()","\"NaN\"");78shouldBe("Number(Infinity).toExponential()","\"Infinity\"");79shouldBe("Number(-Infinity).toExponential()","\"-Infinity\"");80shouldBe("Number(NaN).toExponential(4)","\"NaN\"");81shouldBe("Number(Infinity).toExponential(4)","\"Infinity\"");82shouldBe("Number(-Infinity).toExponential(4)","\"-Infinity\"");83shouldBe("Number(123.456).toExponential()","\"1.23456e+2\"");84shouldBeTrue("try { Number(123.456).toExponential(-1) } catch (e) { String(e).indexOf('Range') >= 0; }");85shouldBe("Number(123.456).toExponential(0)","\"1e+2\"");86shouldBe("Number(123.456).toExponential(1)","\"1.2e+2\"");87shouldBe("Number(123.456).toExponential(2)","\"1.23e+2\"");88shouldBe("Number(123.456).toExponential(3)","\"1.235e+2\"");89shouldBe("Number(123.456).toExponential(4)","\"1.2346e+2\"");90shouldBe("Number(123.456).toExponential(5)","\"1.23456e+2\"");91shouldBe("Number(123.456).toExponential(6)","\"1.234560e+2\"");92shouldBe("Number(123.456).toExponential(7)","\"1.2345600e+2\"");93shouldBe("Number(123.456).toExponential(8)","\"1.23456000e+2\"");94shouldBe("Number(123.456).toExponential(9)","\"1.234560000e+2\"");95shouldBe("Number(123.456).toExponential(10)","\"1.2345600000e+2\"");96shouldBe("Number(123.456).toExponential(11)","\"1.23456000000e+2\"");97shouldBe("Number(123.456).toExponential(12)","\"1.234560000000e+2\"");98shouldBe("Number(123.456).toExponential(13)","\"1.2345600000000e+2\"");99shouldBe("Number(123.456).toExponential(14)","\"1.23456000000000e+2\"");100shouldBe("Number(123.456).toExponential(15)","\"1.234560000000000e+2\"");101shouldBe("Number(123.456).toExponential(16)","\"1.2345600000000000e+2\"");102shouldBe("Number(123.456).toExponential(17)","\"1.23456000000000000e+2\"");103shouldBe("Number(123.456).toExponential(18)","\"1.234560000000000000e+2\"");104shouldBe("Number(123.456).toExponential(19)","\"1.2345600000000000000e+2\"");105shouldBe("Number(123.456).toExponential(20)","\"1.23456000000000000000e+2\"");106shouldBeTrue("try { Number(123.456).toExponential(21) } catch (e) { String(e).indexOf('Range') >= 0; }");107shouldBe("Number(-123.456).toExponential()","\"-1.23456e+2\"");108shouldBeTrue("try { Number(-123.456).toExponential(-1) } catch (e) { String(e).indexOf('Range') >= 0; }");109shouldBe("Number(-123.456).toExponential(0)","\"-1e+2\"");110shouldBe("Number(-123.456).toExponential(1)","\"-1.2e+2\"");111shouldBe("Number(-123.456).toExponential(2)","\"-1.23e+2\"");112shouldBe("Number(-123.456).toExponential(3)","\"-1.235e+2\"");113shouldBe("Number(-123.456).toExponential(4)","\"-1.2346e+2\"");114shouldBe("Number(-123.456).toExponential(5)","\"-1.23456e+2\"");115shouldBe("Number(-123.456).toExponential(6)","\"-1.234560e+2\"");116shouldBe("Number(-123.456).toExponential(7)","\"-1.2345600e+2\"");117shouldBe("Number(-123.456).toExponential(8)","\"-1.23456000e+2\"");118shouldBe("Number(-123.456).toExponential(9)","\"-1.234560000e+2\"");119shouldBe("Number(-123.456).toExponential(10)","\"-1.2345600000e+2\"");120shouldBe("Number(-123.456).toExponential(11)","\"-1.23456000000e+2\"");121shouldBe("Number(-123.456).toExponential(12)","\"-1.234560000000e+2\"");122shouldBe("Number(-123.456).toExponential(13)","\"-1.2345600000000e+2\"");123shouldBe("Number(-123.456).toExponential(14)","\"-1.23456000000000e+2\"");124shouldBe("Number(-123.456).toExponential(15)","\"-1.234560000000000e+2\"");125shouldBe("Number(-123.456).toExponential(16)","\"-1.2345600000000000e+2\"");126shouldBe("Number(-123.456).toExponential(17)","\"-1.23456000000000000e+2\"");127shouldBe("Number(-123.456).toExponential(18)","\"-1.234560000000000000e+2\"");128shouldBe("Number(-123.456).toExponential(19)","\"-1.2345600000000000000e+2\"");129shouldBe("Number(-123.456).toExponential(20)","\"-1.23456000000000000000e+2\"");130shouldBeTrue("try { Number(-123.456).toExponential(21) } catch (e) { String(e).indexOf('Range') >= 0; }");131shouldBe("Number(.000123456).toExponential()","\"1.23456e-4\"");132shouldBeTrue("try { Number(.000123456).toExponential(-1) } catch (e) { String(e).indexOf('Range') >= 0; }");133shouldBe("Number(.000123456).toExponential(0)","\"1e-4\"");134shouldBe("Number(.000123456).toExponential(1)","\"1.2e-4\"");135shouldBe("Number(.000123456).toExponential(2)","\"1.23e-4\"");136shouldBe("Number(.000123456).toExponential(3)","\"1.235e-4\"");137shouldBe("Number(.000123456).toExponential(4)","\"1.2346e-4\"");138shouldBe("Number(.000123456).toExponential(5)","\"1.23456e-4\"");139shouldBe("Number(.000123456).toExponential(6)","\"1.234560e-4\"");140shouldBe("Number(.000123456).toExponential(7)","\"1.2345600e-4\"");141shouldBe("Number(.000123456).toExponential(8)","\"1.23456000e-4\"");142shouldBe("Number(.000123456).toExponential(9)","\"1.234560000e-4\"");143shouldBe("Number(.000123456).toExponential(10)","\"1.2345600000e-4\"");144shouldBe("Number(.000123456).toExponential(11)","\"1.23456000000e-4\"");145shouldBe("Number(.000123456).toExponential(12)","\"1.234560000000e-4\"");146shouldBe("Number(.000123456).toExponential(13)","\"1.2345600000000e-4\"");147shouldBe("Number(.000123456).toExponential(14)","\"1.23456000000000e-4\"");148shouldBe("Number(.000123456).toExponential(15)","\"1.234560000000000e-4\"");149shouldBe("Number(.000123456).toExponential(16)","\"1.2345600000000000e-4\"");150shouldBe("Number(.000123456).toExponential(17)","\"1.23456000000000000e-4\"");151shouldBe("Number(.000123456).toExponential(18)","\"1.234560000000000000e-4\"");152shouldBe("Number(.000123456).toExponential(19)","\"1.2345600000000000000e-4\"");153shouldBe("Number(.000123456).toExponential(20)","\"1.23456000000000000000e-4\"");154shouldBeTrue("try { Number(.000123456).toExponential(21) } catch (e) { String(e).indexOf('Range') >= 0; }");155shouldBe("Number(-.000123456).toExponential()","\"-1.23456e-4\"");156shouldBeTrue("try { Number(-.000123456).toExponential(-1) } catch (e) { String(e).indexOf('Range') >= 0; }");157shouldBe("Number(-.000123456).toExponential(0)","\"-1e-4\"");158shouldBe("Number(-.000123456).toExponential(1)","\"-1.2e-4\"");159shouldBe("Number(-.000123456).toExponential(2)","\"-1.23e-4\"");160shouldBe("Number(-.000123456).toExponential(3)","\"-1.235e-4\"");161shouldBe("Number(-.000123456).toExponential(4)","\"-1.2346e-4\"");162shouldBe("Number(-.000123456).toExponential(5)","\"-1.23456e-4\"");163shouldBe("Number(-.000123456).toExponential(6)","\"-1.234560e-4\"");164shouldBe("Number(-.000123456).toExponential(7)","\"-1.2345600e-4\"");165shouldBe("Number(-.000123456).toExponential(8)","\"-1.23456000e-4\"");166shouldBe("Number(-.000123456).toExponential(9)","\"-1.234560000e-4\"");167shouldBe("Number(-.000123456).toExponential(10)","\"-1.2345600000e-4\"");168shouldBe("Number(-.000123456).toExponential(11)","\"-1.23456000000e-4\"");169shouldBe("Number(-.000123456).toExponential(12)","\"-1.234560000000e-4\"");170shouldBe("Number(-.000123456).toExponential(13)","\"-1.2345600000000e-4\"");171shouldBe("Number(-.000123456).toExponential(14)","\"-1.23456000000000e-4\"");172shouldBe("Number(-.000123456).toExponential(15)","\"-1.234560000000000e-4\"");173shouldBe("Number(-.000123456).toExponential(16)","\"-1.2345600000000000e-4\"");174shouldBe("Number(-.000123456).toExponential(17)","\"-1.23456000000000000e-4\"");175shouldBe("Number(-.000123456).toExponential(18)","\"-1.234560000000000000e-4\"");176shouldBe("Number(-.000123456).toExponential(19)","\"-1.2345600000000000000e-4\"");177shouldBe("Number(-.000123456).toExponential(20)","\"-1.23456000000000000000e-4\"");178shouldBeTrue("try { Number(-.000123456).toExponential(21) } catch (e) { String(e).indexOf('Range') >= 0; }");179shouldBe("Number(123.4567890123456789012).toExponential()","\"1.2345678901234568e+2\"");180shouldBeTrue("try { Number(123.4567890123456789012).toExponential(-1) } catch (e) { String(e).indexOf('Range') >= 0; }");181shouldBe("Number(123.4567890123456789012).toExponential(0)","\"1e+2\"");182shouldBe("Number(123.4567890123456789012).toExponential(1)","\"1.2e+2\"");183shouldBe("Number(123.4567890123456789012).toExponential(2)","\"1.23e+2\"");184shouldBe("Number(123.4567890123456789012).toExponential(3)","\"1.235e+2\"");185shouldBe("Number(123.4567890123456789012).toExponential(4)","\"1.2346e+2\"");186shouldBe("Number(123.4567890123456789012).toExponential(5)","\"1.23457e+2\"");187shouldBe("Number(123.4567890123456789012).toExponential(6)","\"1.234568e+2\"");188shouldBe("Number(123.4567890123456789012).toExponential(7)","\"1.2345679e+2\"");189shouldBe("Number(123.4567890123456789012).toExponential(8)","\"1.23456789e+2\"");190shouldBe("Number(123.4567890123456789012).toExponential(9)","\"1.234567890e+2\"");191shouldBe("Number(123.4567890123456789012).toExponential(10)","\"1.2345678901e+2\"");192shouldBe("Number(123.4567890123456789012).toExponential(11)","\"1.23456789012e+2\"");193shouldBe("Number(123.4567890123456789012).toExponential(12)","\"1.234567890123e+2\"");194shouldBe("Number(123.4567890123456789012).toExponential(13)","\"1.2345678901235e+2\"");195shouldBe("Number(123.4567890123456789012).toExponential(14)","\"1.23456789012346e+2\"");196shouldBe("Number(123.4567890123456789012).toExponential(15)","\"1.234567890123457e+2\"");197shouldBe("Number(123.4567890123456789012).toExponential(16)","\"1.2345678901234570e+2\"");198shouldBe("Number(123.4567890123456789012).toExponential(17)","\"1.23456789012345700e+2\"");199shouldBe("Number(123.4567890123456789012).toExponential(18)","\"1.234567890123457100e+2\"");200shouldBe("Number(123.4567890123456789012).toExponential(19)","\"1.2345678901234570000e+2\"");201shouldBe("Number(123.4567890123456789012).toExponential(20)","\"1.23456789012345700000e+2\"");202shouldBeTrue("try { Number(123.4567890123456789012).toExponential(21) } catch (e) { String(e).indexOf('Range') >= 0; }");203shouldBe("Number(-123.4567890123456789012).toExponential()","\"-1.2345678901234568e+2\"");204shouldBeTrue("try { Number(-123.4567890123456789012).toExponential(-1) } catch (e) { String(e).indexOf('Range') >= 0; }");205shouldBe("Number(-123.4567890123456789012).toExponential(0)","\"-1e+2\"");206shouldBe("Number(-123.4567890123456789012).toExponential(1)","\"-1.2e+2\"");207shouldBe("Number(-123.4567890123456789012).toExponential(2)","\"-1.23e+2\"");208shouldBe("Number(-123.4567890123456789012).toExponential(3)","\"-1.235e+2\"");209shouldBe("Number(-123.4567890123456789012).toExponential(4)","\"-1.2346e+2\"");210shouldBe("Number(-123.4567890123456789012).toExponential(5)","\"-1.23457e+2\"");211shouldBe("Number(-123.4567890123456789012).toExponential(6)","\"-1.234568e+2\"");212shouldBe("Number(-123.4567890123456789012).toExponential(7)","\"-1.2345679e+2\"");213shouldBe("Number(-123.4567890123456789012).toExponential(8)","\"-1.23456789e+2\"");214shouldBe("Number(-123.4567890123456789012).toExponential(9)","\"-1.234567890e+2\"");215shouldBe("Number(-123.4567890123456789012).toExponential(10)","\"-1.2345678901e+2\"");216shouldBe("Number(-123.4567890123456789012).toExponential(11)","\"-1.23456789012e+2\"");217shouldBe("Number(-123.4567890123456789012).toExponential(12)","\"-1.234567890123e+2\"");218shouldBe("Number(-123.4567890123456789012).toExponential(13)","\"-1.2345678901235e+2\"");219shouldBe("Number(-123.4567890123456789012).toExponential(14)","\"-1.23456789012346e+2\"");220shouldBe("Number(-123.4567890123456789012).toExponential(15)","\"-1.234567890123457e+2\"");221shouldBe("Number(-123.4567890123456789012).toExponential(16)","\"-1.2345678901234570e+2\"");222shouldBe("Number(-123.4567890123456789012).toExponential(17)","\"-1.23456789012345700e+2\"");223shouldBe("Number(-123.4567890123456789012).toExponential(18)","\"-1.234567890123457100e+2\"");224shouldBe("Number(-123.4567890123456789012).toExponential(19)","\"-1.2345678901234570000e+2\"");225shouldBe("Number(-123.4567890123456789012).toExponential(20)","\"-1.23456789012345700000e+2\"");226shouldBeTrue("try { Number(-123.4567890123456789012).toExponential(21) } catch (e) { String(e).indexOf('Range') >= 0; }");227shouldBe("Number(.0000000000000000000001).toExponential()","\"1e-22\"");228shouldBe("Number(.0000000000000000000012).toExponential()","\"1.2e-21\"");229shouldBe("Number(.0000000000000000000123).toExponential()","\"1.23e-20\"");230shouldBe("Number(.0000000000000000000123).toExponential()","\"1.23e-20\"");231shouldBe("Number(.0000000000000000001234).toExponential()","\"1.234e-19\"");232shouldBe("Number(.0000000000000000012345).toExponential()","\"1.2345e-18\"");233shouldBe("Number(.0000000000000000123456).toExponential()","\"1.23456e-17\"");234shouldBe("Number(.0000000000000001234567).toExponential()","\"1.234567e-16\"");235shouldBe("Number(.0000000000000012345678).toExponential()","\"1.2345678e-15\"");236shouldBe("Number(.0000000000000123456789).toExponential()","\"1.23456789e-14\"");237shouldBe("Number(.0000000000001234567890).toExponential()","\"1.23456789e-13\"");238shouldBe("Number(.0000000000012345678901).toExponential()","\"1.2345678901e-12\"");239shouldBe("Number(.0000000000123456789012).toExponential()","\"1.23456789012e-11\"");240shouldBe("Number(.0000000001234567890123).toExponential()","\"1.234567890123e-10\"");241shouldBe("Number(.0000000012345678901234).toExponential()","\"1.2345678901234e-9\"");242shouldBe("Number(.0000000123456789012345).toExponential()","\"1.23456789012345e-8\"");243shouldBe("Number(.0000001234567890123456).toExponential()","\"1.234567890123456e-7\"");244shouldBe("Number(.0000012345678901234567).toExponential()","\"1.2345678901234567e-6\"");245shouldBe("Number(.0000123456789012345678).toExponential()","\"1.2345678901234568e-5\"");246shouldBe("Number(.0001234567890123456789).toExponential()","\"1.2345678901234567e-4\"");247shouldBe("Number(.0012345678901234567890).toExponential()","\"1.2345678901234567e-3\"");248shouldBe("Number(.0123456789012345678901).toExponential()","\"1.2345678901234568e-2\"");249shouldBe("Number(1.234567890123456789012).toExponential()","\"1.2345678901234567e+0\"");250shouldBe("Number(12.34567890123456789012).toExponential()","\"1.2345678901234567e+1\"");251shouldBe("Number(123.4567890123456789012).toExponential()","\"1.2345678901234568e+2\"");252shouldBe("Number(1234.567890123456789012).toExponential()","\"1.234567890123457e+3\"");253shouldBe("Number(12345.67890123456789012).toExponential()","\"1.2345678901234567e+4\"");254shouldBe("Number(123456.7890123456789012).toExponential()","\"1.2345678901234567e+5\"");255shouldBe("Number(1234567.890123456789012).toExponential()","\"1.2345678901234567e+6\"");256shouldBe("Number(12345678.90123456789012).toExponential()","\"1.2345678901234567e+7\"");257shouldBe("Number(123456789.0123456789012).toExponential()","\"1.2345678901234567e+8\"");258shouldBe("Number(1234567890.123456789012).toExponential()","\"1.2345678901234567e+9\"");259shouldBe("Number(12345678901.23456789012).toExponential()","\"1.2345678901234568e+10\"");260shouldBe("Number(123456789012.3456789012).toExponential()","\"1.2345678901234567e+11\"");261shouldBe("Number(1234567890123.456789012).toExponential()","\"1.2345678901234568e+12\"");262shouldBe("Number(12345678901234.56789012).toExponential()","\"1.2345678901234568e+13\"");263shouldBe("Number(123456789012345.6789012).toExponential()","\"1.2345678901234567e+14\"");264shouldBe("Number(1234567890123456.789012).toExponential()","\"1.2345678901234568e+15\"");265shouldBe("Number(12345678901234567.89012).toExponential()","\"1.2345678901234568e+16\"");266shouldBe("Number(123456789012345678.9012).toExponential()","\"1.2345678901234568e+17\"");267shouldBe("Number(1234567890123456789.012).toExponential()","\"1.2345678901234568e+18\"");268shouldBe("Number(12345678901234567890.12).toExponential()","\"1.2345678901234567e+19\"");269shouldBe("Number(123456789012345678901.2).toExponential()","\"1.2345678901234568e+20\"");270shouldBe("Number(-.0000000000000000000001).toExponential()","\"-1e-22\"");271shouldBe("Number(-.0000000000000000000012).toExponential()","\"-1.2e-21\"");272shouldBe("Number(-.0000000000000000000123).toExponential()","\"-1.23e-20\"");273shouldBe("Number(-.0000000000000000000123).toExponential()","\"-1.23e-20\"");274shouldBe("Number(-.0000000000000000001234).toExponential()","\"-1.234e-19\"");275shouldBe("Number(-.0000000000000000012345).toExponential()","\"-1.2345e-18\"");276shouldBe("Number(-.0000000000000000123456).toExponential()","\"-1.23456e-17\"");277shouldBe("Number(-.0000000000000001234567).toExponential()","\"-1.234567e-16\"");278shouldBe("Number(-.0000000000000012345678).toExponential()","\"-1.2345678e-15\"");279shouldBe("Number(-.0000000000000123456789).toExponential()","\"-1.23456789e-14\"");280shouldBe("Number(-.0000000000001234567890).toExponential()","\"-1.23456789e-13\"");281shouldBe("Number(-.0000000000012345678901).toExponential()","\"-1.2345678901e-12\"");282shouldBe("Number(-.0000000000123456789012).toExponential()","\"-1.23456789012e-11\"");283shouldBe("Number(-.0000000001234567890123).toExponential()","\"-1.234567890123e-10\"");284shouldBe("Number(-.0000000012345678901234).toExponential()","\"-1.2345678901234e-9\"");285shouldBe("Number(-.0000000123456789012345).toExponential()","\"-1.23456789012345e-8\"");286shouldBe("Number(-.0000001234567890123456).toExponential()","\"-1.234567890123456e-7\"");287shouldBe("Number(-.0000012345678901234567).toExponential()","\"-1.2345678901234567e-6\"");288shouldBe("Number(-.0000123456789012345678).toExponential()","\"-1.2345678901234568e-5\"");289shouldBe("Number(-.0001234567890123456789).toExponential()","\"-1.2345678901234567e-4\"");290shouldBe("Number(-.0012345678901234567890).toExponential()","\"-1.2345678901234567e-3\"");291shouldBe("Number(-.0123456789012345678901).toExponential()","\"-1.2345678901234568e-2\"");292shouldBe("Number(-1.234567890123456789012).toExponential()","\"-1.2345678901234567e+0\"");293shouldBe("Number(-12.34567890123456789012).toExponential()","\"-1.2345678901234567e+1\"");294shouldBe("Number(-123.4567890123456789012).toExponential()","\"-1.2345678901234568e+2\"");295shouldBe("Number(-1234.567890123456789012).toExponential()","\"-1.234567890123457e+3\"");296shouldBe("Number(-12345.67890123456789012).toExponential()","\"-1.2345678901234567e+4\"");297shouldBe("Number(-123456.7890123456789012).toExponential()","\"-1.2345678901234567e+5\"");298shouldBe("Number(-1234567.890123456789012).toExponential()","\"-1.2345678901234567e+6\"");299shouldBe("Number(-12345678.90123456789012).toExponential()","\"-1.2345678901234567e+7\"");300shouldBe("Number(-123456789.0123456789012).toExponential()","\"-1.2345678901234567e+8\"");301shouldBe("Number(-1234567890.123456789012).toExponential()","\"-1.2345678901234567e+9\"");302shouldBe("Number(-12345678901.23456789012).toExponential()","\"-1.2345678901234568e+10\"");303shouldBe("Number(-123456789012.3456789012).toExponential()","\"-1.2345678901234567e+11\"");304shouldBe("Number(-1234567890123.456789012).toExponential()","\"-1.2345678901234568e+12\"");305shouldBe("Number(-12345678901234.56789012).toExponential()","\"-1.2345678901234568e+13\"");306shouldBe("Number(-123456789012345.6789012).toExponential()","\"-1.2345678901234567e+14\"");307shouldBe("Number(-1234567890123456.789012).toExponential()","\"-1.2345678901234568e+15\"");308shouldBe("Number(-12345678901234567.89012).toExponential()","\"-1.2345678901234568e+16\"");309shouldBe("Number(-123456789012345678.9012).toExponential()","\"-1.2345678901234568e+17\"");310shouldBe("Number(-1234567890123456789.012).toExponential()","\"-1.2345678901234568e+18\"");311shouldBe("Number(-12345678901234567890.12).toExponential()","\"-1.2345678901234567e+19\"");312shouldBe("Number(-123456789012345678901.2).toExponential()","\"-1.2345678901234568e+20\"");313shouldBeTrue("try { Number(1).toPrecision(-1); } catch (e) { String(e).indexOf('Range') >= 0; }");314shouldBeTrue("try { Number(1).toPrecision(0); } catch (e) { String(e).indexOf('Range') >= 0; }");315shouldBe("try { Number(1).toPrecision(1); } catch (e) { String(e); }","\"1\"");316shouldBe("try { Number(1).toPrecision(21); } catch (e) { String(e); }","\"1.00000000000000000000\"");317shouldBeTrue("try { Number(1).toPrecision(22); } catch (e) { String(e).indexOf('Range') >= 0; }");318shouldBe("Number(NaN).toPrecision()","\"NaN\"");319shouldBe("Number(NaN).toPrecision(1)","\"NaN\"");320shouldBe("Number(Infinity).toPrecision()","\"Infinity\"");321shouldBe("Number(Infinity).toPrecision(1)","\"Infinity\"");322shouldBe("Number(-Infinity).toPrecision()","\"-Infinity\"");323shouldBe("Number(-Infinity).toPrecision(1)","\"-Infinity\"");324shouldBe("Number(.0000000012345).toPrecision(2)","\"1.2e-9\"");325shouldBe("Number(.000000012345).toPrecision(2)","\"1.2e-8\"");326shouldBe("Number(.00000012345).toPrecision(2)","\"1.2e-7\"");327shouldBe("Number(.0000012345).toPrecision(2)","\"0.0000012\"");328shouldBe("Number(.000012345).toPrecision(2)","\"0.000012\"");329shouldBe("Number(.00012345).toPrecision(2)","\"0.00012\"");330shouldBe("Number(.0012345).toPrecision(2)","\"0.0012\"");331shouldBe("Number(.012345).toPrecision(2)","\"0.012\"");332shouldBe("Number(.12345).toPrecision(2)","\"0.12\"");333shouldBe("Number(1.2345).toPrecision(2)","\"1.2\"");334shouldBe("Number(12.345).toPrecision(2)","\"12\"");335shouldBe("Number(123.45).toPrecision(2)","\"1.2e+2\"");336shouldBe("Number(1234.5).toPrecision(2)","\"1.2e+3\"");337shouldBe("Number(12345).toPrecision(2)","\"1.2e+4\"");338shouldBe("Number(12345.67).toPrecision(4)","\"1.235e+4\"");339shouldBe("Number(12344.67).toPrecision(4)","\"1.234e+4\"");340shouldBe("Number(0.0001234567890123456789012345).toPrecision()","\"0.00012345678901234567\"");341shouldBe("Number(0.0001234567890123456789012345).toPrecision(1)","\"0.0001\"");342shouldBe("Number(0.0001234567890123456789012345).toPrecision(2)","\"0.00012\"");343shouldBe("Number(0.0001234567890123456789012345).toPrecision(3)","\"0.000123\"");344shouldBe("Number(0.0001234567890123456789012345).toPrecision(4)","\"0.0001235\"");345shouldBe("Number(0.0001234567890123456789012345).toPrecision(5)","\"0.00012346\"");346shouldBe("Number(0.0001234567890123456789012345).toPrecision(6)","\"0.000123457\"");347shouldBe("Number(0.0001234567890123456789012345).toPrecision(7)","\"0.0001234568\"");348shouldBe("Number(0.0001234567890123456789012345).toPrecision(8)","\"0.00012345679\"");349shouldBe("Number(0.0001234567890123456789012345).toPrecision(9)","\"0.000123456789\"");350shouldBe("Number(0.0001234567890123456789012345).toPrecision(10)","\"0.0001234567890\"");351shouldBe("Number(0.0001234567890123456789012345).toPrecision(11)","\"0.00012345678901\"");352shouldBe("Number(0.0001234567890123456789012345).toPrecision(12)","\"0.000123456789012\"");353shouldBe("Number(0.0001234567890123456789012345).toPrecision(13)","\"0.0001234567890123\"");354shouldBe("Number(0.0001234567890123456789012345).toPrecision(14)","\"0.00012345678901235\"");355shouldBe("Number(0.0001234567890123456789012345).toPrecision(15)","\"0.000123456789012346\"");356shouldBe("Number(0.0001234567890123456789012345).toPrecision(16)","\"0.0001234567890123457\"");357shouldBe("Number(0.0001234567890123456789012345).toPrecision(17)","\"0.00012345678901234568\"");358shouldBe("Number(0.0001234567890123456789012345).toPrecision(18)","\"0.000123456789012345680\"");359shouldBe("Number(0.0001234567890123456789012345).toPrecision(19)","\"0.0001234567890123456800\"");360shouldBe("Number(0.0001234567890123456789012345).toPrecision(20)","\"0.00012345678901234567000\"");361shouldBe("Number(0.0001234567890123456789012345).toPrecision(21)","\"0.000123456789012345680000\"");362shouldBe("Number(12345.67890123456789012345).toPrecision()","\"12345.678901234567\"");363shouldBe("Number(12345.67890123456789012345).toPrecision(1)","\"1e+4\"");364shouldBe("Number(12345.67890123456789012345).toPrecision(2)","\"1.2e+4\"");365shouldBe("Number(12345.67890123456789012345).toPrecision(3)","\"1.23e+4\"");366shouldBe("Number(12345.67890123456789012345).toPrecision(4)","\"1.235e+4\"");367shouldBe("Number(12345.67890123456789012345).toPrecision(5)","\"12346\"");368shouldBe("Number(12345.67890123456789012345).toPrecision(6)","\"12345.7\"");369shouldBe("Number(12345.67890123456789012345).toPrecision(7)","\"12345.68\"");370shouldBe("Number(12345.67890123456789012345).toPrecision(8)","\"12345.679\"");371shouldBe("Number(12345.67890123456789012345).toPrecision(9)","\"12345.6789\"");372shouldBe("Number(12345.67890123456789012345).toPrecision(10)","\"12345.67890\"");373shouldBe("Number(12345.67890123456789012345).toPrecision(11)","\"12345.678901\"");374shouldBe("Number(12345.67890123456789012345).toPrecision(12)","\"12345.6789012\"");375shouldBe("Number(12345.67890123456789012345).toPrecision(13)","\"12345.67890123\"");376shouldBe("Number(12345.67890123456789012345).toPrecision(14)","\"12345.678901235\"");377shouldBe("Number(12345.67890123456789012345).toPrecision(15)","\"12345.6789012346\"");378shouldBe("Number(12345.67890123456789012345).toPrecision(16)","\"12345.67890123457\"");379shouldBe("Number(12345.67890123456789012345).toPrecision(17)","\"12345.678901234568\"");380shouldBe("Number(12345.67890123456789012345).toPrecision(18)","\"12345.6789012345660\"");381shouldBe("Number(12345.67890123456789012345).toPrecision(19)","\"12345.67890123456800\"");382shouldBe("Number(12345.67890123456789012345).toPrecision(20)","\"12345.678901234565000\"");383shouldBe("Number(12345.67890123456789012345).toPrecision(21)","\"12345.6789012345670000\"");384shouldBe("Number(-.0000000012345).toPrecision(2)","\"-1.2e-9\"");385shouldBe("Number(-.000000012345).toPrecision(2)","\"-1.2e-8\"");386shouldBe("Number(-.00000012345).toPrecision(2)","\"-1.2e-7\"");387shouldBe("Number(-.0000012345).toPrecision(2)","\"-0.0000012\"");388shouldBe("Number(-.000012345).toPrecision(2)","\"-0.000012\"");389shouldBe("Number(-.00012345).toPrecision(2)","\"-0.00012\"");390shouldBe("Number(-.0012345).toPrecision(2)","\"-0.0012\"");391shouldBe("Number(-.012345).toPrecision(2)","\"-0.012\"");392shouldBe("Number(-.12345).toPrecision(2)","\"-0.12\"");393shouldBe("Number(-1.2345).toPrecision(2)","\"-1.2\"");394shouldBe("Number(-12.345).toPrecision(2)","\"-12\"");395shouldBe("Number(-123.45).toPrecision(2)","\"-1.2e+2\"");396shouldBe("Number(-1234.5).toPrecision(2)","\"-1.2e+3\"");397shouldBe("Number(-12345).toPrecision(2)","\"-1.2e+4\"");398shouldBe("Number(-12345.67).toPrecision(4)","\"-1.235e+4\"");399shouldBe("Number(-12344.67).toPrecision(4)","\"-1.234e+4\"");400shouldBe("Number(-0.0001234567890123456789012345).toPrecision()","\"-0.00012345678901234567\"");401shouldBe("Number(-0.0001234567890123456789012345).toPrecision(1)","\"-0.0001\"");402shouldBe("Number(-0.0001234567890123456789012345).toPrecision(2)","\"-0.00012\"");403shouldBe("Number(-0.0001234567890123456789012345).toPrecision(3)","\"-0.000123\"");404shouldBe("Number(-0.0001234567890123456789012345).toPrecision(4)","\"-0.0001235\"");405shouldBe("Number(-0.0001234567890123456789012345).toPrecision(5)","\"-0.00012346\"");406shouldBe("Number(-0.0001234567890123456789012345).toPrecision(6)","\"-0.000123457\"");407shouldBe("Number(-0.0001234567890123456789012345).toPrecision(7)","\"-0.0001234568\"");408shouldBe("Number(-0.0001234567890123456789012345).toPrecision(8)","\"-0.00012345679\"");409shouldBe("Number(-0.0001234567890123456789012345).toPrecision(9)","\"-0.000123456789\"");410shouldBe("Number(-0.0001234567890123456789012345).toPrecision(10)","\"-0.0001234567890\"");411shouldBe("Number(-0.0001234567890123456789012345).toPrecision(11)","\"-0.00012345678901\"");412shouldBe("Number(-0.0001234567890123456789012345).toPrecision(12)","\"-0.000123456789012\"");413shouldBe("Number(-0.0001234567890123456789012345).toPrecision(13)","\"-0.0001234567890123\"");414shouldBe("Number(-0.0001234567890123456789012345).toPrecision(14)","\"-0.00012345678901235\"");415shouldBe("Number(-0.0001234567890123456789012345).toPrecision(15)","\"-0.000123456789012346\"");416shouldBe("Number(-0.0001234567890123456789012345).toPrecision(16)","\"-0.0001234567890123457\"");417shouldBe("Number(-0.0001234567890123456789012345).toPrecision(17)","\"-0.00012345678901234568\"");418shouldBe("Number(-0.0001234567890123456789012345).toPrecision(18)","\"-0.000123456789012345680\"");419shouldBe("Number(-0.0001234567890123456789012345).toPrecision(19)","\"-0.0001234567890123456800\"");420shouldBe("Number(-0.0001234567890123456789012345).toPrecision(20)","\"-0.00012345678901234567000\"");421shouldBe("Number(-0.0001234567890123456789012345).toPrecision(21)","\"-0.000123456789012345680000\"");422shouldBe("Number(-12345.67890123456789012345).toPrecision()","\"-12345.678901234567\"");423shouldBe("Number(-12345.67890123456789012345).toPrecision(1)","\"-1e+4\"");424shouldBe("Number(-12345.67890123456789012345).toPrecision(2)","\"-1.2e+4\"");425shouldBe("Number(-12345.67890123456789012345).toPrecision(3)","\"-1.23e+4\"");426shouldBe("Number(-12345.67890123456789012345).toPrecision(4)","\"-1.235e+4\"");427shouldBe("Number(-12345.67890123456789012345).toPrecision(5)","\"-12346\"");428shouldBe("Number(-12345.67890123456789012345).toPrecision(6)","\"-12345.7\"");429shouldBe("Number(-12345.67890123456789012345).toPrecision(7)","\"-12345.68\"");430shouldBe("Number(-12345.67890123456789012345).toPrecision(8)","\"-12345.679\"");431shouldBe("Number(-12345.67890123456789012345).toPrecision(9)","\"-12345.6789\"");432shouldBe("Number(-12345.67890123456789012345).toPrecision(10)","\"-12345.67890\"");433shouldBe("Number(-12345.67890123456789012345).toPrecision(11)","\"-12345.678901\"");434shouldBe("Number(-12345.67890123456789012345).toPrecision(12)","\"-12345.6789012\"");435shouldBe("Number(-12345.67890123456789012345).toPrecision(13)","\"-12345.67890123\"");436shouldBe("Number(-12345.67890123456789012345).toPrecision(14)","\"-12345.678901235\"");437shouldBe("Number(-12345.67890123456789012345).toPrecision(15)","\"-12345.6789012346\"");438shouldBe("Number(-12345.67890123456789012345).toPrecision(16)","\"-12345.67890123457\"");439shouldBe("Number(-12345.67890123456789012345).toPrecision(17)","\"-12345.678901234568\"");440shouldBe("Number(-12345.67890123456789012345).toPrecision(18)","\"-12345.6789012345660\"");441shouldBe("Number(-12345.67890123456789012345).toPrecision(19)","\"-12345.67890123456800\"");442shouldBe("Number(-12345.67890123456789012345).toPrecision(20)","\"-12345.678901234565000\"");443shouldBe("Number(-12345.67890123456789012345).toPrecision(21)","\"-12345.6789012345670000\"");444shouldBe("Number(0).toPrecision()","\"0\"");445shouldBe("Number(0).toPrecision(1)","\"0\"");446shouldBe("Number(0).toPrecision(2)","\"0.0\"");447shouldBe("Number(0).toPrecision(3)","\"0.00\"");448shouldBe("Number(0).toPrecision(4)","\"0.000\"");449shouldBe("Number(0).toPrecision(5)","\"0.0000\"");450shouldBe("Number(0).toPrecision(6)","\"0.00000\"");451shouldBe("Number(0).toPrecision(7)","\"0.000000\"");452shouldBe("Number(0).toPrecision(8)","\"0.0000000\"");453shouldBe("Number(0).toPrecision(9)","\"0.00000000\"");454shouldBe("Number(0).toPrecision(10)","\"0.000000000\"");455shouldBe("Number(0).toPrecision(11)","\"0.0000000000\"");456shouldBe("Number(0).toPrecision(12)","\"0.00000000000\"");457shouldBe("Number(0).toPrecision(13)","\"0.000000000000\"");458shouldBe("Number(0).toPrecision(14)","\"0.0000000000000\"");459shouldBe("Number(0).toPrecision(15)","\"0.00000000000000\"");460shouldBe("Number(0).toPrecision(16)","\"0.000000000000000\"");461shouldBe("Number(0).toPrecision(17)","\"0.0000000000000000\"");462shouldBe("Number(0).toPrecision(18)","\"0.00000000000000000\"");463shouldBe("Number(0).toPrecision(19)","\"0.000000000000000000\"");464shouldBe("Number(0).toPrecision(20)","\"0.0000000000000000000\"");465shouldBe("Number(0).toPrecision(21)","\"0.00000000000000000000\"");...
constant-folding.js
Source:constant-folding.js
1description(2"This test checks some cases that might be affected by constant folding."3);4shouldBe('"abc" + "2.1"', '"abc2.1"');5shouldBe('"123" + "2.1"', '"1232.1"');6shouldBe('"123" + "="', '"123="');7shouldBe('"*" + "123"', '"*123"');8shouldBe('!"abc"', 'false');9shouldBe('!""', 'true');10shouldBe('10.3 + 2.1', '12.4');11shouldBe('10.3 + "2.1"', '"10.32.1"');12shouldBe('"10.3" + 2.1 ', '"10.32.1"');13shouldBe('"10.3" + "2.1"', '"10.32.1"');14shouldBe('10.3 + true', '11.3');15shouldBe('"10.3" + true', '"10.3true"');16shouldBe('10.3 + false', '10.3');17shouldBe('"10.3" + false', '"10.3false"');18shouldBe('true + 2.1', '3.1');19shouldBe('true + "2.1"', '"true2.1"');20shouldBe('false + 2.1', '2.1');21shouldBe('false + "2.1"', '"false2.1"');22shouldBe('10.3 - 2.1', '8.200000000000001');23shouldBe('10.3 - "2.1"', '8.200000000000001');24shouldBe('"10.3" - 2.1 ', '8.200000000000001');25shouldBe('"10.3" - "2.1"', '8.200000000000001');26shouldBe('10.3 - true', '9.3');27shouldBe('"10.3" - true', '9.3');28shouldBe('10.3 - false', '10.3');29shouldBe('"10.3" - false', '10.3');30shouldBe('true - 2.1', '-1.1');31shouldBe('true - "2.1"', '-1.1');32shouldBe('false - 2.1', '-2.1');33shouldBe('false - "2.1"', '-2.1');34shouldBe('10.3 * 2.1', '21.630000000000003');35shouldBe('10.3 * "2.1"', '21.630000000000003');36shouldBe('"10.3" * 2.1', '21.630000000000003');37shouldBe('"10.3" * "2.1"', '21.630000000000003');38shouldBe('10.3 * true', '10.3');39shouldBe('"10.3" * true', '10.3');40shouldBe('10.3 * false', '0');41shouldBe('"10.3" * false', '0');42shouldBe('true * 10.3', '10.3');43shouldBe('true * "10.3"', '10.3');44shouldBe('false * 10.3', '0');45shouldBe('false * "10.3"', '0');46shouldBe('10.3 / 2', '5.15');47shouldBe('"10.3" / 2', '5.15');48shouldBe('10.3 / "2"', '5.15');49shouldBe('"10.3" / "2"', '5.15');50shouldBe('10.3 / true', '10.3');51shouldBe('"10.3" / true', '10.3');52shouldBe('true / 2', '0.5');53shouldBe('true / "2"', '0.5');54shouldBe('false / 2', '0');55shouldBe('false / "2"', '0');56shouldBe('10.3 % 2.1', '1.9000000000000004');57shouldBe('"10.3" % 2.1', '1.9000000000000004');58shouldBe('10.3 % "2.1"', '1.9000000000000004');59shouldBe('"10.3" % "2.1"', '1.9000000000000004');60shouldBe('10.3 % true', '0.3000000000000007');61shouldBe('"10.3" % true', '0.3000000000000007');62shouldBe('true % 2', '1');63shouldBe('true % "2"', '1');64shouldBe('false % 2', '0');65shouldBe('false % "2"', '0');66shouldBe('10.3 << 2.1', '40');67shouldBe('"10.3" << 2.1', '40');68shouldBe('10.3 << "2.1"', '40');69shouldBe('"10.3" << "2.1"', '40');70shouldBe('10.3 << true', '20');71shouldBe('"10.3" << true', '20');72shouldBe('10.3 << false', '10');73shouldBe('"10.3" << false', '10');74shouldBe('true << 2.1', '4');75shouldBe('true << "2.1"', '4');76shouldBe('false << 2.1', '0');77shouldBe('false << "2.1"', '0');78shouldBe('10.3 >> 2.1', '2');79shouldBe('"10.3" >> 2.1', '2');80shouldBe('10.3 >> "2.1"', '2');81shouldBe('"10.3" >> "2.1"', '2');82shouldBe('10.3 >> true', '5');83shouldBe('"10.3" >> true', '5');84shouldBe('10.3 >> false', '10');85shouldBe('"10.3" >> false', '10');86shouldBe('true >> 2.1', '0');87shouldBe('true >> "2.1"', '0');88shouldBe('false >> 2.1', '0');89shouldBe('false >> "2.1"', '0');90shouldBe('-10.3 >>> 2.1', '1073741821');91shouldBe('"-10.3">>> 2.1', '1073741821');92shouldBe('-10.3 >>> "2.1"', '1073741821');93shouldBe('"-10.3">>> "2.1"', '1073741821');94shouldBe('-10.3 >>> true', '2147483643');95shouldBe('"-10.3">>> true', '2147483643');96shouldBe('-10.3 >>> false', '4294967286');97shouldBe('"-10.3" >>> false', '4294967286');98shouldBe('true >>> 2.1', '0');99shouldBe('true >>> "2.1"', '0');100shouldBe('false >>> 2.1', '0');101shouldBe('false >>> "2.1"', '0');102shouldBe('10.3 & 3.1', '2');103shouldBe('"10.3" & 3.1', '2');104shouldBe('10.3 & "3.1"', '2');105shouldBe('"10.3" & "3.1"', '2');106shouldBe('10.3 & true', '0');107shouldBe('"10.3" & true', '0');108shouldBe('11.3 & true', '1');109shouldBe('"11.3" & true', '1');110shouldBe('10.3 & false', '0');111shouldBe('"10.3" & false', '0');112shouldBe('11.3 & false', '0');113shouldBe('"11.3" & false', '0');114shouldBe('true & 3.1', '1');115shouldBe('true & "3.1"', '1');116shouldBe('true & 2.1', '0');117shouldBe('true & "2.1"', '0');118shouldBe('false & 3.1', '0');119shouldBe('false & "3.1"', '0');120shouldBe('false & 2.1', '0');121shouldBe('false & "2.1"', '0');122shouldBe('10.3 | 3.1', '11');123shouldBe('"10.3" | 3.1', '11');124shouldBe('10.3 | "3.1"', '11');125shouldBe('"10.3" | "3.1"', '11');126shouldBe('10.3 | true', '11');127shouldBe('"10.3" | true', '11');128shouldBe('11.3 | true', '11');129shouldBe('"11.3" | true', '11');130shouldBe('10.3 | false', '10');131shouldBe('"10.3" | false', '10');132shouldBe('11.3 | false', '11');133shouldBe('"11.3" | false', '11');134shouldBe('true | 3.1', '3');135shouldBe('true | "3.1"', '3');136shouldBe('true | 2.1', '3');137shouldBe('true | "2.1"', '3');138shouldBe('false | 3.1', '3');139shouldBe('false | "3.1"', '3');140shouldBe('false | 2.1', '2');141shouldBe('false | "2.1"', '2');142shouldBe('10.3 ^ 3.1', '9');143shouldBe('"10.3" ^ 3.1', '9');144shouldBe('10.3 ^ "3.1"', '9');145shouldBe('"10.3" ^ "3.1"', '9');146shouldBe('10.3 ^ true', '11');147shouldBe('"10.3" ^ true', '11');148shouldBe('11.3 ^ true', '10');149shouldBe('"11.3" ^ true', '10');150shouldBe('10.3 ^ false', '10');151shouldBe('"10.3" ^ false', '10');152shouldBe('11.3 ^ false', '11');153shouldBe('"11.3" ^ false', '11');154shouldBe('true ^ 3.1', '2');155shouldBe('true ^ "3.1"', '2');156shouldBe('true ^ 2.1', '3');157shouldBe('true ^ "2.1"', '3');158shouldBe('false ^ 3.1', '3');159shouldBe('false ^ "3.1"', '3');160shouldBe('false ^ 2.1', '2');161shouldBe('false ^ "2.1"', '2');162shouldBe('10.3 == 3.1', 'false');163shouldBe('3.1 == 3.1', 'true');164shouldBe('"10.3" == 3.1', 'false');165shouldBe('"3.1" == 3.1', 'true');166shouldBe('10.3 == "3.1"', 'false');167shouldBe('3.1 == "3.1"', 'true');168shouldBe('"10.3" == "3.1"', 'false');169shouldBe('"3.1" == "3.1"', 'true');170shouldBe('10.3 == true', 'false');171shouldBe('1 == true', 'true');172shouldBe('"10.3" == true', 'false');173shouldBe('"1" == true', 'true');174shouldBe('10.3 == false', 'false');175shouldBe('0 == false', 'true');176shouldBe('"10.3" == false', 'false');177shouldBe('"0" == false', 'true');178shouldBe('true == 3.1', 'false');179shouldBe('true == 1', 'true');180shouldBe('true == "3.1"', 'false');181shouldBe('true == "1" ', 'true');182shouldBe('false == 3.1', 'false');183shouldBe('false == 0', 'true');184shouldBe('false == "3.1"', 'false');185shouldBe('false == "0"', 'true');186shouldBe('true == true', 'true');187shouldBe('false == true', 'false');188shouldBe('true == false', 'false');189shouldBe('false == false', 'true');190shouldBe('10.3 != 3.1', 'true');191shouldBe('3.1 != 3.1', 'false');192shouldBe('"10.3" != 3.1', 'true');193shouldBe('"3.1" != 3.1', 'false');194shouldBe('10.3 != "3.1"', 'true');195shouldBe('3.1 != "3.1"', 'false');196shouldBe('"10.3" != "3.1"', 'true');197shouldBe('"3.1" != "3.1"', 'false');198shouldBe('10.3 != true', 'true');199shouldBe('1 != true', 'false');200shouldBe('"10.3" != true', 'true');201shouldBe('"1" != true', 'false');202shouldBe('10.3 != false', 'true');203shouldBe('0 != false', 'false');204shouldBe('"10.3" != false', 'true');205shouldBe('"0" != false', 'false');206shouldBe('true != 3.1', 'true');207shouldBe('true != 1', 'false');208shouldBe('true != "3.1"', 'true');209shouldBe('true != "1" ', 'false');210shouldBe('false != 3.1', 'true');211shouldBe('false != 0', 'false');212shouldBe('false != "3.1"', 'true');213shouldBe('false != "0"', 'false');214shouldBe('true != true', 'false');215shouldBe('false != true', 'true');216shouldBe('true != false', 'true');217shouldBe('false != false', 'false');218shouldBe('10.3 > 3.1', 'true');219shouldBe('3.1 > 3.1', 'false');220shouldBe('"10.3" > 3.1', 'true');221shouldBe('"3.1" > 3.1', 'false');222shouldBe('10.3 > "3.1"', 'true');223shouldBe('3.1 > "3.1"', 'false');224shouldBe('"10.3" > "3.1"', 'false');225shouldBe('"3.1" > "3.1"', 'false');226shouldBe('10.3 > true', 'true');227shouldBe('0 > true', 'false');228shouldBe('"10.3" > true', 'true');229shouldBe('"0" > true', 'false');230shouldBe('10.3 > false', 'true');231shouldBe('-1 > false', 'false');232shouldBe('"10.3" > false', 'true');233shouldBe('"-1" > false', 'false');234shouldBe('true > 0.1', 'true');235shouldBe('true > 1.1', 'false');236shouldBe('true > "0.1"', 'true');237shouldBe('true > "1.1"', 'false');238shouldBe('false > -3.1', 'true');239shouldBe('false > 0', 'false');240shouldBe('false > "-3.1"', 'true');241shouldBe('false > "0"', 'false');242shouldBe('true > true', 'false');243shouldBe('false > true', 'false');244shouldBe('true > false', 'true');245shouldBe('false > false', 'false');246shouldBe('10.3 < 3.1', 'false');247shouldBe('2.1 < 3.1', 'true');248shouldBe('"10.3" < 3.1', 'false');249shouldBe('"2.1" < 3.1', 'true');250shouldBe('10.3 < "3.1"', 'false');251shouldBe('2.1 < "3.1"', 'true');252shouldBe('"10.3" < "3.1"', 'true');253shouldBe('"2.1" < "3.1"', 'true');254shouldBe('10.3 < true', 'false');255shouldBe('0 < true', 'true');256shouldBe('"10.3" < true', 'false');257shouldBe('"0" < true', 'true');258shouldBe('10.3 < false', 'false');259shouldBe('-1 < false', 'true');260shouldBe('"10.3" < false', 'false');261shouldBe('"-1" < false', 'true');262shouldBe('true < 0.1', 'false');263shouldBe('true < 1.1', 'true');264shouldBe('true < "0.1"', 'false');265shouldBe('true < "1.1"', 'true');266shouldBe('false < -3.1', 'false');267shouldBe('false < 0.1', 'true');268shouldBe('false < "-3.1"', 'false');269shouldBe('false < "0.1"', 'true');270shouldBe('true < true', 'false');271shouldBe('false < true', 'true');272shouldBe('true < false', 'false');273shouldBe('false < false', 'false');274shouldBe('10.3 >= 3.1', 'true');275shouldBe('2.1 >= 3.1', 'false');276shouldBe('"10.3" >= 3.1', 'true');277shouldBe('"2.1" >= 3.1', 'false');278shouldBe('10.3 >= "3.1"', 'true');279shouldBe('2.1 >= "3.1"', 'false');280shouldBe('"10.3" >= "3.1"', 'false');281shouldBe('"2.1" >= "3.1"', 'false');282shouldBe('10.3 >= true', 'true');283shouldBe('0 >= true', 'false');284shouldBe('"10.3" >= true', 'true');285shouldBe('"0" >= true', 'false');286shouldBe('10.3 >= false', 'true');287shouldBe('-1 >= false', 'false');288shouldBe('"10.3" >= false', 'true');289shouldBe('"-1" >= false', 'false');290shouldBe('true >= 0.1', 'true');291shouldBe('true >= 1.1', 'false');292shouldBe('true >= "0.1"', 'true');293shouldBe('true >= "1.1"', 'false');294shouldBe('false >= -3.1', 'true');295shouldBe('false >= 0', 'true');296shouldBe('false >= "-3.1"', 'true');297shouldBe('false >= "0"', 'true');298shouldBe('true >= true', 'true');299shouldBe('false >= true', 'false');300shouldBe('true >= false', 'true');301shouldBe('false >= false', 'true');302shouldBe('10.3 <= 3.1', 'false');303shouldBe('2.1 <= 3.1', 'true');304shouldBe('"10.3" <= 3.1', 'false');305shouldBe('"2.1" <= 3.1', 'true');306shouldBe('10.3 <= "3.1"', 'false');307shouldBe('2.1 <= "3.1"', 'true');308shouldBe('"10.3" <= "3.1"', 'true');309shouldBe('"2.1" <= "3.1"', 'true');310shouldBe('10.3 <= true', 'false');311shouldBe('0 <= true', 'true');312shouldBe('"10.3" <= true', 'false');313shouldBe('"0" <= true', 'true');314shouldBe('10.3 <= false', 'false');315shouldBe('-1 <= false', 'true');316shouldBe('"10.3" <= false', 'false');317shouldBe('"-1" <= false', 'true');318shouldBe('true <= 0.1', 'false');319shouldBe('true <= 1.1', 'true');320shouldBe('true <= "0.1"', 'false');321shouldBe('true <= "1.1"', 'true');322shouldBe('false <= -3.1', 'false');323shouldBe('false <= 0.1', 'true');324shouldBe('false <= "-3.1"', 'false');325shouldBe('false <= "0.1"', 'true');326shouldBe('true <= true', 'true');327shouldBe('false <= true', 'true');328shouldBe('true <= false', 'false');329shouldBe('false <= false', 'true');330shouldBe('true && true', 'true');331shouldBe('true && false', 'false');332shouldBe('false && true', 'false');333shouldBe('false && false', 'false');334shouldBe('1.1 && true', 'true');335shouldBe('1.1 && false', 'false');336shouldBe('0 && true', '0');337shouldBe('0 && false', '0');338shouldBe('"1.1" && true', 'true');339shouldBe('"1.1" && false', 'false');340shouldBe('"0" && true', 'true');341shouldBe('"0" && false', 'false');342shouldBe('true && 1.1', '1.1');343shouldBe('true && 0', '0');344shouldBe('false && 1.1', 'false');345shouldBe('false && 0', 'false');346shouldBe('true && "1.1"', '"1.1"');347shouldBe('true && "0"', '"0"');348shouldBe('false && "1.1"', 'false');349shouldBe('false && "0"', 'false');350shouldBe('1.1 && 1.1', '1.1');351shouldBe('1.1 && 0', '0');352shouldBe('0 && 1.1', '0');353shouldBe('0 && 0', '0');354shouldBe('"1.1" && 1.1', '1.1');355shouldBe('"1.1" && 0', '0');356shouldBe('"0" && 1.1', '1.1');357shouldBe('"0" && 0', '0');358shouldBe('1.1 && "1.1"', '"1.1"');359shouldBe('1.1 && "0"', '"0"');360shouldBe('0 && "1.1"', '0');361shouldBe('0 && "0"', '0');362shouldBe('"1.1" && "1.1"', '"1.1"');363shouldBe('"1.1" && "0"', '"0"');364shouldBe('"0" && "1.1"', '"1.1"');365shouldBe('"0" && "0"', '"0"');366shouldBe('true || true', 'true');367shouldBe('true || false', 'true');368shouldBe('false || true', 'true');369shouldBe('false || false', 'false');370shouldBe('1.1 || true', '1.1');371shouldBe('1.1 || false', '1.1');372shouldBe('0 || true', 'true');373shouldBe('0 || false', 'false');374shouldBe('"1.1" || true', '"1.1"');375shouldBe('"1.1" || false', '"1.1"');376shouldBe('"0" || true', '"0"');377shouldBe('"0" || false', '"0"');378shouldBe('true || 1.1', 'true');379shouldBe('true || 0', 'true');380shouldBe('false || 1.1', '1.1');381shouldBe('false || 0', '0');382shouldBe('true || "1.1"', 'true');383shouldBe('true || "0"', 'true');384shouldBe('false || "1.1"', '"1.1"');385shouldBe('false || "0"', '"0"');386shouldBe('1.1 || 1.1', '1.1');387shouldBe('1.1 || 0', '1.1');388shouldBe('0 || 1.1', '1.1');389shouldBe('0 || 0', '0');390shouldBe('"1.1" || 1.1', '"1.1"');391shouldBe('"1.1" || 0', '"1.1"');392shouldBe('"0" || 1.1', '"0"');393shouldBe('"0" || 0', '"0"');394shouldBe('1.1 || "1.1"', '1.1');395shouldBe('1.1 || "0"', '1.1');396shouldBe('0 || "1.1"', '"1.1"');397shouldBe('0 || "0"', '"0"');398shouldBe('"1.1" || "1.1"', '"1.1"');399shouldBe('"1.1" || "0"', '"1.1"');400shouldBe('"0" || "1.1"', '"0"');401shouldBe('"0" || "0"', '"0"');402shouldBe('+3.1', '3.1');403shouldBe('+ +3.1', '3.1');404shouldBe('+"3.1"', '3.1');405shouldBe('+true', '1');406shouldBe('+false', '0');407shouldBe('-3.1', '-3.1');408shouldBe('- -3.1', '3.1');409shouldBe('-"3.1"', '-3.1');410shouldBe('-true', '-1');411shouldBe('-false', '-0');412shouldBe('~3', '-4');413shouldBe('~ ~3', '3');414shouldBe('~"3"', '-4');415shouldBe('~true', '-2');416shouldBe('~false', '-1');417shouldBe('!true', 'false');418shouldBe('!false', 'true');419shouldBe('!3', 'false');420shouldBe('!0', 'true');421shouldBe('10.3 / 0', 'Infinity');422shouldBe('"10.3" / 0', 'Infinity');423shouldBe('-10.3 / 0', '-Infinity');424shouldBe('"-10.3" / 0', '-Infinity');425shouldBe('true / 0', 'Infinity');426shouldBe('false / 0', 'NaN');427shouldBe('0 / 0', 'NaN');428shouldBe('10.3 / -0', '-Infinity');429shouldBe('"10.3" / -0', '-Infinity');430shouldBe('-10.3 / -0', 'Infinity');431shouldBe('"-10.3" / -0', 'Infinity');432shouldBe('true / -0', '-Infinity');433shouldBe('false / -0', 'NaN');434shouldBe('0 / -0', 'NaN');435shouldBe('1 / -0', '-Infinity');436shouldBe('1 / - 0', '-Infinity');437shouldBe('1 / - -0', 'Infinity');438shouldBe('1 / - - -0', '-Infinity');...
math.js
Source:math.js
1description(2"This test checks the behavior of the Math object as described in 15.8 of the language specification."3);4shouldBe("Math.abs(NaN)", "NaN");5shouldBe("Math.abs(0)", "0");6shouldBe("Math.abs(-0)", "0");7shouldBe("Math.abs(1)", "1");8shouldBe("Math.abs(-1)", "1");9shouldBe("Math.abs(Number.MIN_VALUE)", "Number.MIN_VALUE");10shouldBe("Math.abs(-Number.MIN_VALUE)", "Number.MIN_VALUE");11shouldBe("Math.abs(Number.MAX_VALUE)", "Number.MAX_VALUE");12shouldBe("Math.abs(-Number.MAX_VALUE)", "Number.MAX_VALUE");13shouldBe("Math.abs(Infinity)", "Infinity");14shouldBe("Math.abs(-Infinity)", "Infinity");15shouldBe("Math.acos(NaN)", "NaN");16shouldBe("Math.acos(-0)", "Math.acos(0)");17shouldBe("Math.acos(1)", "0");18shouldBe("Math.acos(1.1)", "NaN");19shouldBe("Math.acos(-1.1)", "NaN");20shouldBe("Math.acos(Infinity)", "NaN");21shouldBe("Math.acos(-Infinity)", "NaN");22shouldBe("Math.asin(NaN)", "NaN");23shouldBe("Math.asin(0)", "0");24shouldBe("Math.asin(-0)", "-0");25shouldBe("Math.asin(1)", "-Math.asin(-1)");26shouldBe("Math.asin(1.1)", "NaN");27shouldBe("Math.asin(-1.1)", "NaN");28shouldBe("Math.asin(Infinity)", "NaN");29shouldBe("Math.asin(-Infinity)", "NaN");30shouldBe("Math.atan(NaN)", "NaN");31shouldBe("Math.atan(0)", "0");32shouldBe("Math.atan(-0)", "-0");33shouldBe("Math.atan(Infinity)", "-Math.atan(-Infinity)");34shouldBe("Math.atan2(NaN, NaN)", "NaN");35shouldBe("Math.atan2(NaN, 0)", "NaN");36shouldBe("Math.atan2(NaN, -0)", "NaN");37shouldBe("Math.atan2(NaN, 1)", "NaN");38shouldBe("Math.atan2(NaN, Infinity)", "NaN");39shouldBe("Math.atan2(NaN, -Infinity)", "NaN");40shouldBe("Math.atan2(0, NaN)", "NaN");41shouldBe("Math.atan2(-0, NaN)", "NaN");42shouldBe("Math.atan2(1, NaN)", "NaN");43shouldBe("Math.atan2(Infinity, NaN)", "NaN");44shouldBe("Math.atan2(-Infinity, NaN)", "NaN");45/*46⢠Ify>0andxis+0, theresult isanimplementation-dependent approximationto +Ï/2. 47⢠Ify>0andxisâ0, theresult isanimplementation-dependent approximationto +Ï/2. 48⢠Ifyis+0andx>0, theresult is+0. 49⢠Ifyis+0andxis+0, theresult is+0. 50⢠Ifyis+0andxisâ0, theresult isanimplementation-dependent approximationto +Ï. 51⢠Ifyis+0andx<0, theresult isanimplementation-dependent approximationto +Ï. 52⢠Ifyisâ0andx>0, theresult isâ0. 53⢠Ifyisâ0andxis+0, theresult isâ0. 54⢠Ifyisâ0andxisâ0, theresult isanimplementation-dependent approximationto âÏ. 55⢠Ifyisâ0andx<0, theresult isanimplementation-dependent approximationto âÏ. 56⢠Ify<0andxis+0, theresult isanimplementation-dependent approximationto âÏ/2. 57⢠Ify<0andxisâ0, theresult isanimplementation-dependent approximationto âÏ/2. 58⢠Ify>0andyisfiniteandxis+â, theresult is+0. 59⢠Ify>0andyisfiniteandxisââ, theresult ifanimplementation-dependent approximationto +Ï. 60⢠Ify<0andyisfiniteandxis+â, theresult isâ0. 61⢠Ify<0andyisfiniteandxisââ, theresult isanimplementation-dependent approximationtoâÏ. 62⢠Ifyis+âandxisfinite, theresult isanimplementation-dependent approximationto +Ï/2. 63⢠Ifyisââandxisfinite, theresult isanimplementation-dependent approximationto âÏ/2. 64⢠Ifyis+âandxis+â, theresult isanimplementation-dependent approximationto +Ï/4. 65⢠Ifyis+âandxisââ, theresult isanimplementation-dependent approximationto +3Ï/4. 66⢠Ifyisââandxis+â, theresult isanimplementation-dependent approximationto âÏ/4. 67⢠Ifyisââandxisââ, theresult isanimplementation-dependent approximationto â3Ï/4.68*/69shouldBe("Math.ceil(NaN)", "NaN");70shouldBe("Math.ceil(0)", "0");71shouldBe("Math.ceil(-0)", "-0");72shouldBe("Math.ceil(-0.5)", "-0");73shouldBe("Math.ceil(1)", "1");74shouldBe("Math.ceil(-1)", "-1");75shouldBe("Math.ceil(1.1)", "2");76shouldBe("Math.ceil(-1.1)", "-1");77shouldBe("Math.ceil(Number.MIN_VALUE)", "1");78shouldBe("Math.ceil(-Number.MIN_VALUE)", "-0");79shouldBe("Math.ceil(Number.MAX_VALUE)", "Number.MAX_VALUE");80shouldBe("Math.ceil(-Number.MAX_VALUE)", "-Number.MAX_VALUE");81shouldBe("Math.ceil(Infinity)", "Infinity");82shouldBe("Math.ceil(-Infinity)", "-Infinity");83shouldBe("Math.cos(NaN)", "NaN");84shouldBe("Math.cos(0)", "1");85shouldBe("Math.cos(-0)", "1");86shouldBe("Math.cos(Infinity)", "NaN");87shouldBe("Math.cos(-Infinity)", "NaN");88shouldBe("Math.exp(NaN)", "NaN");89shouldBe("Math.exp(0)", "1");90shouldBe("Math.exp(-0)", "1");91shouldBe("Math.exp(Infinity)", "Infinity");92shouldBe("Math.exp(-Infinity)", "0");93shouldBe("Math.floor(NaN)", "NaN");94shouldBe("Math.floor(0)", "0");95shouldBe("Math.floor(-0)", "-0");96shouldBe("Math.floor(0.5)", "0");97shouldBe("Math.floor(1)", "1");98shouldBe("Math.floor(-1)", "-1");99shouldBe("Math.floor(1.1)", "1");100shouldBe("Math.floor(-1.1)", "-2");101shouldBe("Math.floor(Number.MIN_VALUE)", "0");102shouldBe("Math.floor(-Number.MIN_VALUE)", "-1");103shouldBe("Math.floor(Number.MAX_VALUE)", "Number.MAX_VALUE");104shouldBe("Math.floor(-Number.MAX_VALUE)", "-Number.MAX_VALUE");105shouldBe("Math.floor(Infinity)", "Infinity");106shouldBe("Math.floor(-Infinity)", "-Infinity");107shouldBe("Math.log(NaN)", "NaN");108shouldBe("Math.log(0)", "-Infinity");109shouldBe("Math.log(-0)", "-Infinity");110shouldBe("Math.log(1)", "0");111shouldBe("Math.log(-1)", "NaN");112shouldBe("Math.log(-1.1)", "NaN");113shouldBe("Math.log(Infinity)", "Infinity");114shouldBe("Math.log(-Infinity)", "NaN");115shouldBe("Math.max()", "-Infinity");116shouldBe("Math.max(NaN)", "NaN");117shouldBe("Math.max(NaN,1)", "NaN");118shouldBe("Math.max(0)", "0");119shouldBe("Math.max(-0)", "-0");120shouldBe("Math.max(-0, 0)", "0");121shouldBe("Math.min()", "Infinity");122shouldBe("Math.min(NaN)", "NaN");123shouldBe("Math.min(NaN,1)", "NaN");124shouldBe("Math.min(0)", "0");125shouldBe("Math.min(-0)", "-0");126shouldBe("Math.min(-0, 0)", "-0");127shouldBe("Math.pow(NaN, NaN)", "NaN");128shouldBe("Math.pow(NaN, 0)", "1");129shouldBe("Math.pow(NaN, -0)", "1");130shouldBe("Math.pow(NaN, 1)", "NaN");131shouldBe("Math.pow(NaN, Infinity)", "NaN");132shouldBe("Math.pow(NaN, -Infinity)", "NaN");133shouldBe("Math.pow(0, NaN)", "NaN");134shouldBe("Math.pow(-0, NaN)", "NaN");135shouldBe("Math.pow(1, NaN)", "NaN");136shouldBe("Math.pow(Infinity, NaN)", "NaN");137shouldBe("Math.pow(-Infinity, NaN)", "NaN");138/*139⢠Ifabs(x)>1andyis+â, theresult is+â. 140⢠Ifabs(x)>1andyisââ, theresult is+0. 141⢠Ifabs(x)==1andyis+â, theresult isNaN. 142⢠Ifabs(x)==1andyisââ, theresult isNaN. 143⢠Ifabs(x)<1andyis+â, theresult is+0. 144⢠Ifabs(x)<1andyisââ, theresult is+â. 145⢠Ifxis+âandy>0, theresult is+â. 146⢠Ifxis+âandy<0, theresult is+0. 147⢠Ifxisââandy>0andyisanoddinteger, theresult isââ. 148⢠Ifxisââandy>0andyisnot anoddinteger, theresult is+â. 149⢠Ifxisââandy<0andyisanoddinteger, theresult isâ0. 150⢠Ifxisââandy<0andyisnot anoddinteger, theresult is+0. 151⢠Ifxis+0andy>0, theresult is+0. 152⢠Ifxis+0andy<0, theresult is+â. 153⢠Ifxisâ0andy>0andyisanoddinteger, theresult isâ0. 154⢠Ifxisâ0andy>0andyisnot anoddinteger, theresult is+0. 155⢠Ifxisâ0andy<0andyisanoddinteger, theresult isââ. 156⢠Ifxisâ0andy<0andyisnot anoddinteger, theresult is+â. 157⢠Ifx<0andxisfiniteandyisfiniteandyisnot aninteger, theresult isNaN.158*/159shouldBe("Math.round(NaN)", "NaN");160shouldBe("Math.round(0)", "0");161shouldBe("Math.round(-0)", "-0");162shouldBe("Math.round(0.4)", "0");163shouldBe("Math.round(-0.4)", "-0");164shouldBe("Math.round(0.5)", "1");165shouldBe("Math.round(-0.5)", "-0");166shouldBe("Math.round(0.6)", "1");167shouldBe("Math.round(-0.6)", "-1");168shouldBe("Math.round(1)", "1");169shouldBe("Math.round(-1)", "-1");170shouldBe("Math.round(1.1)", "1");171shouldBe("Math.round(-1.1)", "-1");172shouldBe("Math.round(1.5)", "2");173shouldBe("Math.round(-1.5)", "-1");174shouldBe("Math.round(1.6)", "2");175shouldBe("Math.round(-1.6)", "-2");176shouldBe("Math.round(8640000000000000)", "8640000000000000");177// The following is expected. Double can't represent .5 in this case.178shouldBe("Math.round(8640000000000000.5)", "8640000000000000");179shouldBe("Math.round(8640000000000001)", "8640000000000001");180shouldBe("Math.round(8640000000000002)", "8640000000000002");181shouldBe("Math.round(9007199254740990)", "9007199254740990");182shouldBe("Math.round(9007199254740991)", "9007199254740991");183shouldBe("Math.round(1.7976931348623157e+308)", "1.7976931348623157e+308");184shouldBe("Math.round(-8640000000000000)", "-8640000000000000");185shouldBe("Math.round(-8640000000000001)", "-8640000000000001");186shouldBe("Math.round(-8640000000000002)", "-8640000000000002");187shouldBe("Math.round(-9007199254740990)", "-9007199254740990");188shouldBe("Math.round(-9007199254740991)", "-9007199254740991");189shouldBe("Math.round(-1.7976931348623157e+308)", "-1.7976931348623157e+308");190shouldBe("Math.round(Infinity)", "Infinity");191shouldBe("Math.round(-Infinity)", "-Infinity");192shouldBe("Math.sin(NaN)", "NaN");193shouldBe("Math.sin(0)", "0");194shouldBe("Math.sin(-0)", "-0");195shouldBe("Math.sin(Infinity)", "NaN");196shouldBe("Math.sin(-Infinity)", "NaN");197shouldBe("Math.sqrt(NaN)", "NaN");198shouldBe("Math.sqrt(0)", "0");199shouldBe("Math.sqrt(-0)", "-0");200shouldBe("Math.sqrt(1)", "1");201shouldBe("Math.sqrt(-1)", "NaN");202shouldBe("Math.sqrt(Infinity)", "Infinity");203shouldBe("Math.sqrt(-Infinity)", "NaN");204shouldBe("Math.tan(NaN)", "NaN");205shouldBe("Math.tan(0)", "0");206shouldBe("Math.tan(-0)", "-0");207shouldBe("Math.tan(Infinity)", "NaN");208shouldBe("Math.tan(-Infinity)", "NaN");...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!