Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: test/mjsunit/object-literal-overwrite.js

Issue 8888006: Make more JS files beter match the coding standard. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/mjsunit/object-literal.js ('k') | test/mjsunit/object-prevent-extensions.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 var foo3 = { 44 var foo3 = {
45 bar: function(a){}, 45 bar: function(a){},
46 bar: function(b){}, 46 bar: function(b){},
47 bar: 7 47 bar: 7
48 }; 48 };
49 49
50 var foo4 = { 50 var foo4 = {
51 bar: function(b){}, 51 bar: function(b){},
52 bar: 7, 52 bar: 7,
53 bar: function(){return 7}, 53 bar: function(){return 7;},
54 }; 54 };
55 55
56 var foo5 = { 56 var foo5 = {
57 13: function(a){}, 57 13: function(a){},
58 13: 7 58 13: 7
59 } 59 };
60 60
61 var foo6 = { 61 var foo6 = {
62 14.31: function(a){}, 62 14.31: function(a){},
63 14.31: 7 63 14.31: 7
64 } 64 };
65 65
66 var foo7 = { 66 var foo7 = {
67 15: 6, 67 15: 6,
68 15: 7 68 15: 7
69 } 69 };
70 70
71 assertEquals(7, foo1.bar); 71 assertEquals(7, foo1.bar);
72 assertEquals(7, foo2.bar); 72 assertEquals(7, foo2.bar);
73 assertEquals(7, foo3.bar); 73 assertEquals(7, foo3.bar);
74 assertEquals(7, foo4.bar()); 74 assertEquals(7, foo4.bar());
75 assertEquals(7, foo5[13]); 75 assertEquals(7, foo5[13]);
76 assertEquals(7, foo6[14.31]); 76 assertEquals(7, foo6[14.31]);
77 assertEquals(7, foo7[15]); 77 assertEquals(7, foo7[15]);
78 78
79 // Test for the classic code generator. 79 // Test for the classic code generator.
(...skipping 29 matching lines...) Expand all
109 var glob3 = 0; 109 var glob3 = 0;
110 110
111 function fun3() { 111 function fun3() {
112 var r = { 113: glob3++, 113: glob3++, 113: glob3++, 113: 7}; 112 var r = { 113: glob3++, 113: glob3++, 113: glob3++, 113: 7};
113 return r[113]; 113 return r[113];
114 } 114 }
115 115
116 var y = fun3(); 116 var y = fun3();
117 assertEquals(7, y); 117 assertEquals(7, y);
118 assertEquals(3, glob3); 118 assertEquals(3, glob3);
OLDNEW
« no previous file with comments | « test/mjsunit/object-literal.js ('k') | test/mjsunit/object-prevent-extensions.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698