mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-04 06:08:59 +00:00
Improve Tests: Isolate global scroller style in CPScrollViewTest
* CPScrollViewTest: Save and restore global scroller style in setUp and tearDown.
This commit is contained in:
1 parent
6ddcfe0d79
commit
1e979ea2fb
1 file changed
+12
@@ -5,12 +5,24 @@
|
||||
|
||||
@implementation CPScrollViewTest : OJTestCase
|
||||
{
|
||||
CPScrollerStyle globalScrollerStyle;
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
|
||||
globalScrollerStyle = [CPScrollView globalScrollerStyle];
|
||||
}
|
||||
|
||||
/*
|
||||
The global scroller style applies to every scroll view, including those in later
|
||||
test suites, so a test that changes it must not leave it changed.
|
||||
*/
|
||||
- (void)tearDown
|
||||
{
|
||||
[CPScrollView setGlobalScrollerStyle:globalScrollerStyle];
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in new issue
Block a user