Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  testcollections_misc2.py

  Sprache: Python
 


# execute run procedure as Python macro for testing

import uno
import unittest

from com.sun.star.awt.FontSlant import ITALIC
from com.sun.star.awt.FontSlant import NONE
from com.sun.star.uno.TypeClass import STRING
from com.sun.star.uno.TypeClass import LONG
from com.sun.star.awt import Point

class Test124953(unittest.TestCase):

    def test_Enum(self):
        italic = uno.Enum("com.sun.star.awt.FontSlant""ITALIC")
        none_ = uno.Enum("com.sun.star.awt.FontSlant""NONE")
        self.assertEqual(ITALIC, ITALIC)
        self.assertEqual(ITALIC, italic)
        self.assertFalse((ITALIC != italic))
        self.assertNotEqual(ITALIC, NONE)
        self.assertEqual(NONE, none_)

    def test_Type(self):

        STRING_TYPE = uno.getTypeByName("string")
        LONG_TYPE = uno.getTypeByName("long")
        string_type = uno.Type("string", STRING)
        long_type = uno.Type("long", LONG)
        self.assertEqual(STRING_TYPE, STRING_TYPE)
        self.assertEqual(STRING_TYPE, string_type)
        self.assertFalse((STRING_TYPE != string_type))
        self.assertNotEqual(STRING_TYPE, LONG)
        self.assertEqual(LONG_TYPE, long_type)

    def test_Char(self):
        char_a = uno.Char("a")
        char_a2 = uno.Char("a")
        char_b = uno.Char("b")
        self.assertEqual(char_a, char_a)
        self.assertEqual(char_a, char_a2)
        self.assertFalse((char_a != char_a2))
        self.assertNotEqual(char_a, char_b)

    def test_ByteSequence(self):
        b1 = uno.ByteSequence(bytes("abcdefg", encoding="utf8"))
        b2 = uno.ByteSequence(bytes("abcdefg", encoding="utf8"))
        b3 = uno.ByteSequence(bytes("1234567", encoding="utf8"))
        self.assertEqual(b1, b1)
        self.assertEqual(b1, b2)
        self.assertFalse(b1 != b2)
        self.assertNotEqual(b1, b3)

    def test_Struct(self):
        point1 = Point(100200)
        point2 = Point(100200)
        point3 = Point(010)
        self.assertEqual(point1, point1)
        self.assertEqual(point1, point2)
        self.assertFalse((point1 != point2))
        self.assertNotEqual(point1, point3)

Messung V0.5 in Prozent
C=99 H=100 G=99

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet am  2026-06-07) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=752002