File tree Expand file tree Collapse file tree
ClearScriptTest/JavaScript Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// Copyright (c) Microsoft Corporation. All rights reserved.
22// Licensed under the MIT license.
33
4- exports . Meta = module . getContext ( ) ;
4+ exports . Module = module ;
5+ exports . Meta = module . meta ;
56
67exports . Add = function ( a , b ) {
78 return a + b ;
Original file line number Diff line number Diff line change 44let Arithmetic = require ( "../Arithmetic/Arithmetic" ) ;
55let Self = require ( "Geometry" ) ;
66
7- exports . Meta = module . getContext ( ) ;
7+ exports . Module = module ;
8+ exports . Meta = module . meta ;
89
910exports . Rectangle = class {
1011 constructor ( width , height ) {
Original file line number Diff line number Diff line change 44let Arithmetic = require ( "Arithmetic" ) ;
55let Self = require ( "Geometry" ) ;
66
7- exports . Meta = module . getContext ( ) ;
7+ exports . Module = module ;
8+ exports . Meta = module . meta ;
89
910exports . Rectangle = class {
1011 constructor ( width , height ) {
Original file line number Diff line number Diff line change 11// Copyright (c) Microsoft Corporation. All rights reserved.
22// Licensed under the MIT license.
33
4+ // ReSharper disable once JsPathNotFound
45let Geometry = require ( "Geometry/Geometry" ) ;
56
67// ReSharper disable once ReturnFromGlobalScopetWithValue
Original file line number Diff line number Diff line change 11// Copyright (c) Microsoft Corporation. All rights reserved.
22// Licensed under the MIT license.
33
4+ // ReSharper disable once JsPathNotFound
45let Geometry = require ( "Geometry/Geometry" ) ;
56
67foo . bar = new Geometry . Square ( 25 ) . Area ;
Original file line number Diff line number Diff line change 11// Copyright (c) Microsoft Corporation. All rights reserved.
22// Licensed under the MIT license.
33
4+ exports . Module = module ;
45exports . Meta = module . getContext ( ) ;
56
67exports . Add = function ( a , b ) {
Original file line number Diff line number Diff line change 44var Arithmetic = require ( "../Arithmetic/Arithmetic" ) ;
55var Self = require ( "Geometry" ) ;
66
7+ exports . Module = module ;
78exports . Meta = module . getContext ( ) ;
89
9- exports . Rectangle = function ( width , height ) {
10- this . width = width ;
11- this . height = height ;
10+ exports . Rectangle = function ( width , height ) {
11+ this . width = width ;
12+ this . height = height ;
1213}
1314
14- exports . Rectangle . prototype . getArea = function ( ) {
15- return Self . Rectangle . CalculateArea ( this . width , this . height ) ;
15+ exports . Rectangle . prototype . getArea = function ( ) {
16+ return Self . Rectangle . CalculateArea ( this . width , this . height ) ;
1617} ;
1718
18- exports . Rectangle . CalculateArea = function ( width , height ) {
19- return Arithmetic . Multiply ( width , height ) ;
19+ exports . Rectangle . CalculateArea = function ( width , height ) {
20+ return Arithmetic . Multiply ( width , height ) ;
2021} ;
2122
22- exports . Square = function ( side ) {
23- exports . Rectangle . call ( this , side , side ) ;
23+ exports . Square = function ( side ) {
24+ exports . Rectangle . call ( this , side , side ) ;
2425} ;
2526
2627exports . Square . prototype . getArea = exports . Rectangle . prototype . getArea ;
Original file line number Diff line number Diff line change 44var Arithmetic = require ( "Arithmetic" ) ;
55var Self = require ( "Geometry" ) ;
66
7+ exports . Module = module ;
78exports . Meta = module . getContext ( ) ;
89
910exports . Rectangle = function ( width , height ) {
10- this . width = width ;
11- this . height = height ;
11+ this . width = width ;
12+ this . height = height ;
1213}
1314
1415exports . Rectangle . prototype . getArea = function ( ) {
15- return Self . Rectangle . CalculateArea ( this . width , this . height ) ;
16+ return Self . Rectangle . CalculateArea ( this . width , this . height ) ;
1617} ;
1718
1819exports . Rectangle . CalculateArea = function ( width , height ) {
19- return Arithmetic . Multiply ( width , height ) ;
20+ return Arithmetic . Multiply ( width , height ) ;
2021} ;
2122
2223exports . Square = function ( side ) {
23- exports . Rectangle . call ( this , side , side ) ;
24+ exports . Rectangle . call ( this , side , side ) ;
2425} ;
2526
2627exports . Square . prototype . getArea = exports . Rectangle . prototype . getArea ;
Original file line number Diff line number Diff line change 11// Copyright (c) Microsoft Corporation. All rights reserved.
22// Licensed under the MIT license.
33
4- let Geometry = require ( "Geometry/Geometry" ) ;
4+ // ReSharper disable once JsPathNotFound
5+ var Geometry = require ( "Geometry/Geometry" ) ;
56
67// ReSharper disable once ReturnFromGlobalScopetWithValue
7- return new Geometry . Square ( 25 ) . Area ;
8+ return new Geometry . Square ( 25 ) . getArea ( ) ;
Original file line number Diff line number Diff line change 11// Copyright (c) Microsoft Corporation. All rights reserved.
22// Licensed under the MIT license.
33
4- let Geometry = require ( "Geometry/Geometry" ) ;
4+ // ReSharper disable once JsPathNotFound
5+ var Geometry = require ( "Geometry/Geometry" ) ;
56
6- foo . bar = new Geometry . Square ( 25 ) . Area ;
7+ foo . bar = new Geometry . Square ( 25 ) . getArea ( ) ;
78
89// ReSharper disable once ReturnFromGlobalScopetWithValue
910return foo . bar ;
You can’t perform that action at this time.
0 commit comments