diff options
author | Zufu Liu <unknown> | 2021-06-25 19:47:51 +1000 |
---|---|---|
committer | Zufu Liu <unknown> | 2021-06-25 19:47:51 +1000 |
commit | b863e024b9bcdc78a11e2acbc93cc2e1ef79ba2e (patch) | |
tree | 3a02796960465ed764e308d25a4984612c482ba2 /test/simpleTests.py | |
parent | f1d157682479bfa08e82fb513b2d9510f736cc46 (diff) | |
download | scintilla-mirror-b863e024b9bcdc78a11e2acbc93cc2e1ef79ba2e.tar.gz |
Feature [feature-requests:#1400] Set buffering when technology set.
Diffstat (limited to 'test/simpleTests.py')
-rw-r--r-- | test/simpleTests.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/simpleTests.py b/test/simpleTests.py index 2d8b25e68..dca1e24c4 100644 --- a/test/simpleTests.py +++ b/test/simpleTests.py @@ -1854,6 +1854,32 @@ class TestModalSelection(unittest.TestCase): self.assertEquals(self.ed.GetSelectionNAnchor(0), 0) self.ed.ClearSelections() +class TestTechnology(unittest.TestCase): + """ These tests are just to ensure that the calls set and retrieve values. + They assume running on a Direct2D compatible version of Windows. + They do not check visual appearance. + """ + def setUp(self): + self.xite = Xite.xiteFrame + self.ed = self.xite.ed + self.ed.ClearAll() + self.ed.EmptyUndoBuffer() + + def tearDown(self): + self.ed.ClearAll() + self.ed.EmptyUndoBuffer() + + def testTechnologyAndBufferedDraw(self): + self.ed.Technology = self.ed.SC_TECHNOLOGY_DEFAULT + self.assertEquals(self.ed.GetTechnology(), self.ed.SC_TECHNOLOGY_DEFAULT) + if sys.platform == "win32": + self.ed.Technology = self.ed.SC_TECHNOLOGY_DIRECTWRITE + self.assertEquals(self.ed.GetTechnology(), self.ed.SC_TECHNOLOGY_DIRECTWRITE) + self.assertEquals(self.ed.BufferedDraw, False) + self.ed.Technology = self.ed.SC_TECHNOLOGY_DEFAULT + self.assertEquals(self.ed.GetTechnology(), self.ed.SC_TECHNOLOGY_DEFAULT) + self.assertEquals(self.ed.BufferedDraw, True) + class TestStyleAttributes(unittest.TestCase): """ These tests are just to ensure that the calls set and retrieve values. They do not check the visual appearance of the style attributes. |