title: Detect If Two Integers Have Opposite Signs
signature: function detectIfTwoIntegersHaveOppositeSigns(x, y) {
test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value) {
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual, expected){
      return convertToString(actual)===convertToString(expected);
  }
  
  function driver(x, y, expected){
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(x, y),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(59, -99, true);
    console.log(`TEST-0...${result}`);
  
    result = driver(-20, -21, false);
    console.log(`TEST-1...${result}`);
  
    result = driver(-100, 79, true);
    console.log(`TEST-2...${result}`);
  
    result = driver(54, -49, true);
    console.log(`TEST-3...${result}`);
  
    result = driver(-16, 16, true);
    console.log(`TEST-4...${result}`);
  
    result = driver(-23, -68, false);
    console.log(`TEST-5...${result}`);
  
    result = driver(93, 37, false);
    console.log(`TEST-6...${result}`);
  
    result = driver(24, -61, true);
    console.log(`TEST-7...${result}`);
  
    result = driver(-8, 69, true);
    console.log(`TEST-8...${result}`);
  
    result = driver(29, 10, false);
    console.log(`TEST-9...${result}`);
  
    process.exit(0);
  };
  
  if (require.main === module) {
    main();
  }
source_py: def detect_if_two_integers_have_opposite_signs(x, y):
      return ((x ^ y) < 0)
source_cpp: bool detect_if_two_integers_have_opposite_signs(int x, int y) {
    return ( ( x ^ y ) < 0 );
  }