Changeset 122 for trunk/test


Ignore:
Timestamp:
Nov 3, 2005, 10:00:17 PM (19 years ago)
Author:
dkearney
Message:

added initial version of octave language bindings.
1) no claiming language bindings work, but will happily take credit if they do.
2) bindings are untested
3) bindings happen to work with mystery example that happens to be located in examples/app-fermi/matlab/fermi_rp.m and happens to be invokable with examples/app-fermi/matlab/tool_rp.xml
4) bindings need octave2.1-headers installed (in debian: apt-get install octave2.1-headers) to get the mkoctfile program
5) binding function names might be changing to be more discriptive and more tightly bound to either the lib or units module.
6) adjusted Makefile to add octave bindings compilation.

Location:
trunk/test/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/src/RpUnitsF_test.f

    r116 r122  
    1414        IMPLICIT NONE
    1515
    16         integer rp_units_convert_str, rp_units_add_presets
     16        integer rp_units_convert_str
    1717        integer rp_units_convert_dbl
    1818
     
    2121        integer retVal
    2222
    23         retVal = rp_units_add_presets("all")
    24 
    2523        retVal = rp_units_convert_str("72F","C",retStr)
    2624        print *,"72F = ",retStr
     25        print *,"correct retVal = 22.222C",retVal
    2726        print *,"retVal = ",retVal
    2827
    2928        retVal = rp_units_convert_dbl("72F","C",dblVal)
    3029        print *,"72F = ",dblVal, " (no units)"
     30        print *,"correct retVal = 22.222",retVal
    3131        print *,"retVal = ",retVal
    3232
  • trunk/test/src/RpUnits_test.cc

    r116 r122  
    2626    double value = 0.0;
    2727    std::string strValue;
    28     // int failTest = 0;
    2928    int result = 0;
    30     // std::list<double,RpUnits *>
    3129
    3230    //
     
    4139    //
    4240    printf ("=============== TEST 1 ===============\n");
    43 /*
    44     std::string srch_str = std::string("cm");
    45 
    46     RpUnits* meters2 = RpUnits::find("cm");
    47     if (meters2) {
    48         std::cout << "meters2 exists" << std::endl;
    49         std::cout << "meters2 = :" << meters2->getUnitsName() <<":"<< std::endl;
    50     }
    51 
    52     std::cout << "complete"<< std::endl;
    53 
    54 */
    55 
    56 /*
    57     const RpUnits* mobility = RpUnits::defineCmplx("cm2/Vs", NULL);
    58     std::cout << "mobility = :" << mobility->getUnitsName() <<":"<< std::endl;
    59 
    60     const RpUnits* mobility2 = RpUnits::find("cm2V-1s-1");
    61     if (mobility2) {
    62         std::cout << "mobility2 exists" << std::endl;
    63         std::cout << "mobility2 = :" << mobility2->getUnits() <<":"<< std::endl;
    64         std::cout << "mobility2 = :" << mobility2->getUnitsName() <<":"<< std::endl;
    65     }
    66     else {
    67         std::cout << "mobility2 dn exists" << std::endl;
    68     }
    69 */
    7041
    7142    const RpUnits* meters = RpUnits::find("m");
Note: See TracChangeset for help on using the changeset viewer.