Bug_resetisdead.js 683 B

123456789101112131415161718192021
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. function test(p1, p2, p3, p4) {
  6. var a = p1 + p3; var b = p2 + p4; if ((p1 + p2) > (p3 + p4) & a > b) {
  7. return 1;
  8. }
  9. if ((p1 + p2) > (p3 + p4) | (p1 + p3) > (p2 + p4)) {
  10. return 2;
  11. }
  12. return 3;
  13. }
  14. test(1, 20, 3, -1);
  15. test(5, 4, 2, -2);
  16. test(15, 3, -11, 4);
  17. WScript.Echo("PASSED");