title: Add 1 To A Given Number 1
signature: function add1ToAGivenNumber1(x: number): number {
test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value: any): string{
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual: number, expected: number): boolean {
      return convertToString(actual) === convertToString(expected);
  }
  
  function driver(x: number, expected:number): string {
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(x),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(20, 21);
    console.log(`TEST-0...${result}`);
  
    result = driver(68, 69);
    console.log(`TEST-1...${result}`);
  
    result = driver(52, 53);
    console.log(`TEST-2...${result}`);
  
    result = driver(61, 62);
    console.log(`TEST-3...${result}`);
  
    result = driver(3, 4);
    console.log(`TEST-4...${result}`);
  
    result = driver(88, 89);
    console.log(`TEST-5...${result}`);
  
    result = driver(41, 42);
    console.log(`TEST-6...${result}`);
  
    result = driver(78, 79);
    console.log(`TEST-7...${result}`);
  
    result = driver(94, 95);
    console.log(`TEST-8...${result}`);
  
    result = driver(18, 19);
    console.log(`TEST-9...${result}`);
  
  };
  
  main();
source_py: def add_1_to_a_given_number_1(x):
      return (- (~ x))
source_cpp: int add_1_to_a_given_number_1(int x) {
    return ( - ( ~ x ) );
  }