source: trunk/oldtest/src/matlab/test_get_units_name.m @ 4773

Last change on this file since 4773 was 3177, checked in by mmc, 12 years ago

Updated all of the copyright notices to reference the transfer to
the new HUBzero Foundation, LLC.

File size: 1.2 KB
Line 
1% ----------------------------------------------------------------------
2%  TEST: Matlab's Rappture Library Test Functions.
3%
4%   [err] = test_get_units_name(unitName)
5%
6%
7% ======================================================================
8%  AUTHOR:  Derrick Kearney, Purdue University
9%  Copyright (c) 2004-2012  HUBzero Foundation, LLC
10%
11%  See the file "license.terms" for information on usage and
12%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13% ======================================================================
14
15function [err] = test_get_units_name(unitName)
16    err = 1;
17    disp(sprintf('\n\nTESTING rpUnitsGetUnitsName\n'));
18    [unitHandle,err] = rpUnitsFind(unitName);
19    if ~err && unitHandle
20        [retStr,err] = rpUnitsGetUnitsName(unitHandle);
21        if ~err
22            if ~strcmp(retStr,'')
23                disp(sprintf ('units name of %s = %s\n', unitName,retStr));
24            else
25                disp(sprintf ('rpUnitsGetUnitsName FAILED\n'));
26            end
27        else
28            disp(sprintf('Error within rpUnitsGetUnitsName function\n'));
29        end
30    else
31        disp(sprintf ('rpUnitsFind FAILED while testing rpUnitsGetUnitsName\n'));
32    end
33return
Note: See TracBrowser for help on using the repository browser.