Example #1
0
    def new_string(self, embedded_string):
        # Allocate a new string and set its class to be the string class
        result = String(self._nilObject, embedded_string)
        result.set_class(self._stringClass)

        # Return the freshly allocated string
        return result
Example #2
0
    def new_string(self, embedded_string):
        # Allocate a new string and set its class to be the string class
        result = String(self._nilObject, embedded_string)
        result.set_class(self._stringClass)

        # Return the freshly allocated string
        return result
Example #3
0
class StringTestCase(unittest.TestCase):
    def setUp(self):
        self.string = String(Object(None), "test")

    def test_get_embedded_string(self):
        self.assertEqual("test", self.string.get_embedded_string())

    def test_str(self):
        self.assertEqual("\'test\'", str(self.string))
Example #4
0
 def new_string(embedded_string):
     return String(embedded_string)
Example #5
0
 def setUp(self):
     self.string = String(Object(None), "test")
Example #6
0
 def __init__(self, value):
     String.__init__(self, value)
     self._number_of_signature_arguments = self._determine_number_of_signature_arguments(
     )  # updated later
Example #7
0
 def __init__(self, value):
     String.__init__(self, value)
     self._number_of_signature_arguments = self._determine_number_of_signature_arguments() # updated later