octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #60124] fieldnames(., '-full') disappeared


From: Ernst Reissner
Subject: [Octave-bug-tracker] [bug #60124] fieldnames(., '-full') disappeared
Date: Fri, 26 Feb 2021 07:30:22 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36

Follow-up Comment #2, bug #60124 (project octave):

I think the link I sent gives a hint of how to invoke it 
and what it shall deliver. 
Below I attached old java unit test. 
I think it is easy to understand how it worked. 
I had to disable that test in some version, but, 
no idea when. 
Note also that the test does show modifiers like static, 
but it may not show inheritance information. 
I am not sure how complete the old implementation really was. 


    private void testFieldnamesFull(String arg) {
        this.oct.eval("f1=fieldnames(" + arg + ", '-full');");
        // ordering is immaterial 
        this.oct.eval("f2={" +
                      // non-public field inaccessibleI does not show up 

                      // primitive types 

                      // char and Character 
                      "'char cVal', 'java.lang.Character cVAL', " + 
                      // boolean and Boolean 
                      "'boolean zVal', 'java.lang.Boolean zVAL', " + 
                      // float types 
                      "'double dVal', 'java.lang.Double dVAL', " + 
                      "'float fVal', 'java.lang.Float fVAL', " + 
                      // integer types 
                      "'long jVal', 'java.lang.Long jVAL', " + 
                      "'int iVal', 'java.lang.Integer iVAL', " + 
                      "'short sVal', 'java.lang.Short sVAL', " + 
                      "'byte bVal', 'java.lang.Byte bVAL', " + 

                      // arrays of primitive types 

                      // char and Character arrays 
                      "'char[] acVal', 'java.lang.Character[] acVAL', " + 
                      // boolean and Boolean arrays 
                      "'boolean[] azVal', 'java.lang.Boolean[] azVAL', " + 
                      // float type arrays 
                      "'double[] adVal', 'java.lang.Double[] adVAL', " + 
                      "'float[] afVal', 'java.lang.Float[] afVAL', " + 
                      // integer type arrays 
                      "'long[] ajVal', 'java.lang.Long[] ajVAL', " + 
                      "'int[] aiVal', 'java.lang.Integer[] aiVAL', " + 
                      "'short[] asVal', 'java.lang.Short[] asVAL', " + 
                      "'byte[] abVal', 'java.lang.Byte[] abVAL', " + 

                      "'java.lang.Byte[][] aabVAL', " + 

                      // non-primitive java.lang.Number type 
                      "'java.math.BigDecimal bdVal', " + 
                      // static field 
                      "'static java.util.Comparator cmp', " + 
                      "'java.lang.String str', " + 
                      "'java.lang.String[] aStr'" + 
                      "};");
        this.oct.eval("z=isempty(setxor(f1, f2));");
        assertTrue(this.oct.getBool("z"));

        // weakness: no inheritance information, 
        // because the only superclass, Object, has no fields. 
    }


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60124>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]