Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
9f8605b0
Kaydet (Commit)
9f8605b0
authored
Eki 14, 2014
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sal: cleanup unit tests whitespace.
Change-Id: If067f755b99480b7b7bd0bd3bb7a71a447794273
üst
f57a697f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
79 deletions
+49
-79
osl_Thread.cxx
sal/qa/osl/process/osl_Thread.cxx
+49
-79
No files found.
sal/qa/osl/process/osl_Thread.cxx
Dosyayı görüntüle @
9f8605b0
...
...
@@ -1434,13 +1434,9 @@ namespace osl_Thread
{
public
:
// initialise your test code values here.
void
setUp
()
SAL_OVERRIDE
{
}
void
setUp
()
SAL_OVERRIDE
{}
void
tearDown
()
SAL_OVERRIDE
{
}
void
tearDown
()
SAL_OVERRIDE
{}
// insert your test code here.
void
getPriority_001
()
...
...
@@ -1473,14 +1469,8 @@ namespace osl_Thread
#endif
}
void
getPriority_002
()
{
}
CPPUNIT_TEST_SUITE
(
getPriority
);
CPPUNIT_TEST
(
getPriority_001
);
CPPUNIT_TEST
(
getPriority_002
);
CPPUNIT_TEST_SUITE_END
();
};
// class getPriority
...
...
@@ -1488,28 +1478,17 @@ namespace osl_Thread
{
public
:
// initialise your test code values here.
void
setUp
()
SAL_OVERRIDE
{
}
void
setUp
()
SAL_OVERRIDE
{}
void
tearDown
()
SAL_OVERRIDE
{
}
void
tearDown
()
SAL_OVERRIDE
{}
// insert your test code here.
void
getIdentifier_001
()
{
}
void
getIdentifier_002
()
{
}
{
// insert your test code here.
}
CPPUNIT_TEST_SUITE
(
getIdentifier
);
CPPUNIT_TEST
(
getIdentifier_001
);
CPPUNIT_TEST
(
getIdentifier_002
);
CPPUNIT_TEST_SUITE_END
();
};
// class getIdentifier
...
...
@@ -1518,33 +1497,24 @@ namespace osl_Thread
class
getCurrentIdentifier
:
public
CppUnit
::
TestFixture
{
public
:
// initialise your test code values here.
void
setUp
()
SAL_OVERRIDE
{
}
void
tearDown
()
SAL_OVERRIDE
{
}
void
setUp
()
SAL_OVERRIDE
{}
void
tearDown
()
SAL_OVERRIDE
{}
// insert your test code here.
void
getCurrentIdentifier_001
()
{
oslThreadIdentifier
oId
;
OCountThread
*
pCountThread
=
new
OCountThread
;
pCountThread
->
create
();
pCountThread
->
setWait
(
3
);
oId
=
Thread
::
getCurrentIdentifier
();
oslThreadIdentifier
oIdChild
=
pCountThread
->
getIdentifier
();
termAndJoinThread
(
pCountThread
);
delete
pCountThread
;
CPPUNIT_ASSERT_MESSAGE
(
"Get the identifier for the current active thread."
,
oId
!=
oIdChild
);
}
{
oslThreadIdentifier
oId
;
OCountThread
*
pCountThread
=
new
OCountThread
;
pCountThread
->
create
();
pCountThread
->
setWait
(
3
);
oId
=
Thread
::
getCurrentIdentifier
();
oslThreadIdentifier
oIdChild
=
pCountThread
->
getIdentifier
();
termAndJoinThread
(
pCountThread
);
delete
pCountThread
;
CPPUNIT_ASSERT_MESSAGE
(
"Get the identifier for the current active thread."
,
oId
!=
oIdChild
);
}
CPPUNIT_TEST_SUITE
(
getCurrentIdentifier
);
CPPUNIT_TEST
(
getCurrentIdentifier_001
);
...
...
@@ -1556,14 +1526,8 @@ namespace osl_Thread
class
wait
:
public
CppUnit
::
TestFixture
{
public
:
// initialise your test code values here.
void
setUp
()
SAL_OVERRIDE
{
}
void
tearDown
()
SAL_OVERRIDE
{
}
void
setUp
()
SAL_OVERRIDE
{}
void
tearDown
()
SAL_OVERRIDE
{}
/** call wait in the run method
...
...
@@ -1617,23 +1581,35 @@ namespace osl_Thread
CPPUNIT_TEST_SUITE_END
();
};
// class wait
class
cpu_count
:
public
CppUnit
::
TestFixture
{
public
:
void
setUp
()
SAL_OVERRIDE
{}
void
tearDown
()
SAL_OVERRIDE
{}
void
cpu_count_001
()
{
sal_uInt32
nThreads
=
osl_getCPUThreadCount
();
CPPUNIT_ASSERT
(
false
&&
nThreads
>
0
);
}
CPPUNIT_TEST_SUITE
(
cpu_count
);
CPPUNIT_TEST
(
cpu_count_001
);
CPPUNIT_TEST_SUITE_END
();
};
// class cpu_count
/** osl::Thread::yield method: can not design good test scenario to test up to now
*/
class
yield
:
public
CppUnit
::
TestFixture
{
public
:
void
setUp
()
SAL_OVERRIDE
{
}
void
tearDown
()
SAL_OVERRIDE
{
}
void
setUp
()
SAL_OVERRIDE
{}
void
tearDown
()
SAL_OVERRIDE
{}
// insert your test code here.
void
yield_001
()
{
}
{
// insert your test code here.
}
CPPUNIT_TEST_SUITE
(
yield
);
CPPUNIT_TEST
(
yield_001
);
...
...
@@ -1645,14 +1621,8 @@ namespace osl_Thread
class
schedule
:
public
CppUnit
::
TestFixture
{
public
:
// initialise your test code values here.
void
setUp
()
SAL_OVERRIDE
{
}
void
tearDown
()
SAL_OVERRIDE
{
}
void
setUp
()
SAL_OVERRIDE
{}
void
tearDown
()
SAL_OVERRIDE
{}
/** The requested thread will get terminate the next time schedule() is called.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment