source: branches/nanovis2/oldtest/src/octave/test_get_basis.m @ 3305

Last change on this file since 3305 was 3305, checked in by ldelgass, 11 years ago

sync with trunk

File size: 1.3 KB
Line 
1% ----------------------------------------------------------------------
2%  TEST: Octave's Rappture Library Test Functions.
3%
4%   [err] = test_get_basis(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_basis(unitName)
16    err = 1;
17    printf("\n\nTESTING rpUnitsGetBasis\n");
18    [unitHandle,err] = rpUnitsFind(unitName);
19    if !err && unitHandle
20        [basisHandle,err] = rpUnitsGetBasis(unitHandle);
21        if !err
22            if basisHandle > 0
23                [retStr,err] = rpUnitsGetUnitsName(basisHandle);
24                printf ("basisHandle name = %s\n", retStr);
25            elseif basisHandle < 0
26                printf ("%s is a basis unit\n", unitName);
27            else
28                printf ("rpUnitsGetBasis FAILED\n");
29            end
30        else
31            printf("Error within rpUnitsGetBasis function\n");
32        end
33    else
34        printf ("rpUnitsGetBasis FAILED\n");
35    end
36end
Note: See TracBrowser for help on using the repository browser.