Changeset 673


Ignore:
Timestamp:
Apr 26, 2003, 11:35:06 AM (18 years ago)
Author:
luba
Message:
  • tests for corrected To-Int function
Location:
to-imperative/trunk/samples/Convert
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • to-imperative/trunk/samples/Convert/Makefile

    r671 r673  
    1717  to_int_inval \
    1818  to_int.bug1 \
    19   to_int.bug2
     19  to_int.bug2 
    2020 
    2121
  • to-imperative/trunk/samples/Convert/to_int.bug2.cc

    r671 r673  
    3535      RF_TAILCALL (StdIO::PrintLN, (_v_constcharsConversion_sp_failed), ());
    3636    }
    37   LBranch2: {}
    3837    error ("Unexpected fail");
    3938  }
    40 LBlock1: {}
    4139  return true;
    4240RF_END
  • to-imperative/trunk/samples/Convert/to_int.cc

    r651 r673  
    2222    {
    2323      Expr _v_To_m_Int1;
    24       if (RF_CALL (Convert::To_m_Int, (ShortInt::create_expr(32) + ShortInt::create_expr(6)), (_v_To_m_Int1)))
     24      if (RF_CALL (Convert::To_m_Int, (ShortInt::create_expr(+32) + ShortInt::create_expr(6)), (_v_To_m_Int1)))
    2525      {
    2626        RF_CALL (StdIO::PrintLN, (_v_To_m_Int1), ());
  • to-imperative/trunk/samples/Convert/to_int_inval.cc

    r626 r673  
    88using namespace rfrt;
    99
    10 namespace to__int
     10namespace to__int__inval
    1111{
    1212
     
    1515}
    1616
    17 namespace to__int
     17namespace to__int__inval
    1818{
    1919
     
    2222    {
    2323      Expr _v_To_m_Int1;
    24       if (RF_CALL (Convert::To_m_Int, (Char::create_expr("J") + Char::create_expr("o") + Char::create_expr("h") + Char::create_expr("n")), (_v_To_m_Int1)))
     24      if (RF_CALL (Convert::To_m_Int, (Char::create_expr("John")), (_v_To_m_Int1)))
    2525      {
    2626        _v_res1 = empty;
     
    3030    }
    3131  LBranch1: {}
     32    {
     33      Expr _v_constwordfail ("fail");
     34      _v_res1 = empty;
     35      RF_TAILCALL (StdIO::PrintLN, (_v_constwordfail), ());
     36    }
    3237    error ("Unexpected fail");
    3338  }
    34 LBlock1: {}
    3539  return true;
    3640RF_END
     
    3842}
    3943
    40 rfrt::Entry rf_entry (to__int::Main);
     44rfrt::Entry rf_entry (to__int__inval::Main);
    4145
    4246}
  • to-imperative/trunk/samples/Convert/to_int_inval.rf

    r626 r673  
    33
    44Main = { <PrintLN <To-Int 'John'>>;
     5         <PrintLN "fail">;
    56       };
Note: See TracChangeset for help on using the changeset viewer.