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
4e1a015d
Kaydet (Commit)
4e1a015d
authored
Eki 16, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert runState to a proper enum
Change-Id: I6f74e597fe9834b18023e73ee8b8bf50d10c82e2
üst
cb2c4d77
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
33 deletions
+56
-33
Jar_OOoRunner.mk
qadevOOo/Jar_OOoRunner.mk
+1
-0
ExceptionStatus.java
qadevOOo/runner/lib/ExceptionStatus.java
+1
-1
RunState.java
qadevOOo/runner/lib/RunState.java
+43
-0
SimpleStatus.java
qadevOOo/runner/lib/SimpleStatus.java
+7
-28
Status.java
qadevOOo/runner/lib/Status.java
+4
-4
No files found.
qadevOOo/Jar_OOoRunner.mk
Dosyayı görüntüle @
4e1a015d
...
@@ -83,6 +83,7 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
...
@@ -83,6 +83,7 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
qadevOOo/runner/lib/ExceptionStatus \
qadevOOo/runner/lib/ExceptionStatus \
qadevOOo/runner/lib/MultiMethodTest \
qadevOOo/runner/lib/MultiMethodTest \
qadevOOo/runner/lib/MultiPropertyTest \
qadevOOo/runner/lib/MultiPropertyTest \
qadevOOo/runner/lib/RunState \
qadevOOo/runner/lib/SimpleStatus \
qadevOOo/runner/lib/SimpleStatus \
qadevOOo/runner/lib/Status \
qadevOOo/runner/lib/Status \
qadevOOo/runner/lib/StatusException \
qadevOOo/runner/lib/StatusException \
...
...
qadevOOo/runner/lib/ExceptionStatus.java
Dosyayı görüntüle @
4e1a015d
...
@@ -29,7 +29,7 @@ class ExceptionStatus extends Status {
...
@@ -29,7 +29,7 @@ class ExceptionStatus extends Status {
* @param t the exception an activity terminated with.
* @param t the exception an activity terminated with.
*/
*/
ExceptionStatus
(
Throwable
t
)
{
ExceptionStatus
(
Throwable
t
)
{
super
(
EXCEPTION
,
FAILED
);
super
(
RunState
.
EXCEPTION
,
FAILED
);
String
message
=
t
.
getMessage
();
String
message
=
t
.
getMessage
();
if
(
message
!=
null
)
if
(
message
!=
null
)
runStateString
=
message
;
runStateString
=
message
;
...
...
qadevOOo/runner/lib/RunState.java
0 → 100644
Dosyayı görüntüle @
4e1a015d
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
package
lib
;
public
enum
RunState
{
/**
* The constant represents PASSED runtime state.
*/
PASSED
,
/**
* The constant represents EXCEPTION runtime state.
*/
EXCEPTION
,
/**
* The constant represents SKIPPED runtime state.
*/
SKIPPED
,
/**
* This is a private indicator for a user defined runtime state
*/
USER_DEFINED
}
qadevOOo/runner/lib/SimpleStatus.java
Dosyayı görüntüle @
4e1a015d
...
@@ -24,27 +24,6 @@ package lib;
...
@@ -24,27 +24,6 @@ package lib;
* the SimpleSTatus instance.
* the SimpleSTatus instance.
*/
*/
class
SimpleStatus
{
class
SimpleStatus
{
/* Run states. */
/**
* The constatnt represents PASSED runtime state.
*/
public
static
final
int
PASSED
=
0
;
/**
* The constant represents EXCEPTION runtime state.
*/
public
static
final
int
EXCEPTION
=
3
;
/**
* The constant represents SKIPPED runtime state.
*/
public
static
final
int
SKIPPED
=
1
;
/**
* This is a private indicator for a user defined runtime state
*/
private
static
final
int
USER_DEFINED
=
4
;
/* Test states */
/* Test states */
...
@@ -63,7 +42,7 @@ class SimpleStatus {
...
@@ -63,7 +42,7 @@ class SimpleStatus {
/**
/**
* The field is holding reason of the status.
* The field is holding reason of the status.
*/
*/
private
final
int
runState
;
private
final
RunState
runState
;
/**
/**
* This is the run state: either SKIPPED, PASSED, etc.
* This is the run state: either SKIPPED, PASSED, etc.
...
@@ -74,14 +53,14 @@ class SimpleStatus {
...
@@ -74,14 +53,14 @@ class SimpleStatus {
/**
/**
* The constructor initialize state and reason field.
* The constructor initialize state and reason field.
*/
*/
protected
SimpleStatus
(
int
runState
,
boolean
state
)
{
protected
SimpleStatus
(
RunState
runState
,
boolean
state
)
{
this
.
state
=
state
;
this
.
state
=
state
;
this
.
runState
=
runState
;
this
.
runState
=
runState
;
if
(
runState
==
PASSED
)
{
if
(
runState
==
RunState
.
PASSED
)
{
runStateString
=
"PASSED"
;
runStateString
=
"PASSED"
;
}
else
if
(
runState
==
SKIPPED
)
{
}
else
if
(
runState
==
RunState
.
SKIPPED
)
{
runStateString
=
"SKIPPED"
;
runStateString
=
"SKIPPED"
;
}
else
if
(
runState
==
EXCEPTION
)
{
}
else
if
(
runState
==
RunState
.
EXCEPTION
)
{
runStateString
=
"EXCEPTION"
;
runStateString
=
"EXCEPTION"
;
}
else
{
}
else
{
runStateString
=
"UNKNOWN"
;
runStateString
=
"UNKNOWN"
;
...
@@ -93,7 +72,7 @@ class SimpleStatus {
...
@@ -93,7 +72,7 @@ class SimpleStatus {
*/
*/
protected
SimpleStatus
(
String
runStateString
,
boolean
state
)
{
protected
SimpleStatus
(
String
runStateString
,
boolean
state
)
{
this
.
state
=
state
;
this
.
state
=
state
;
this
.
runState
=
USER_DEFINED
;
this
.
runState
=
RunState
.
USER_DEFINED
;
this
.
runStateString
=
runStateString
;
this
.
runStateString
=
runStateString
;
}
}
...
@@ -107,7 +86,7 @@ class SimpleStatus {
...
@@ -107,7 +86,7 @@ class SimpleStatus {
/**
/**
* getRunState() implementation. Just returns th runState field value.
* getRunState() implementation. Just returns th runState field value.
*/
*/
public
int
getRunState
()
{
public
RunState
getRunState
()
{
return
runState
;
return
runState
;
}
}
...
...
qadevOOo/runner/lib/Status.java
Dosyayı görüntüle @
4e1a015d
...
@@ -41,7 +41,7 @@ public class Status extends SimpleStatus {
...
@@ -41,7 +41,7 @@ public class Status extends SimpleStatus {
* @param runState either PASSED, SKIPPED, etc.
* @param runState either PASSED, SKIPPED, etc.
* @param state OK or FAILED.
* @param state OK or FAILED.
*/
*/
public
Status
(
int
runState
,
boolean
state
)
{
public
Status
(
RunState
runState
,
boolean
state
)
{
super
(
runState
,
state
);
super
(
runState
,
state
);
}
}
...
@@ -62,7 +62,7 @@ public class Status extends SimpleStatus {
...
@@ -62,7 +62,7 @@ public class Status extends SimpleStatus {
* otherwise).
* otherwise).
*/
*/
public
static
Status
passed
(
boolean
state
)
{
public
static
Status
passed
(
boolean
state
)
{
return
new
Status
(
PASSED
,
state
);
return
new
Status
(
RunState
.
PASSED
,
state
);
}
}
/**
/**
...
@@ -83,7 +83,7 @@ public class Status extends SimpleStatus {
...
@@ -83,7 +83,7 @@ public class Status extends SimpleStatus {
* otherwise).
* otherwise).
*/
*/
public
static
Status
skipped
(
boolean
state
)
{
public
static
Status
skipped
(
boolean
state
)
{
return
new
Status
(
SKIPPED
,
state
);
return
new
Status
(
RunState
.
SKIPPED
,
state
);
}
}
...
@@ -115,7 +115,7 @@ public class Status extends SimpleStatus {
...
@@ -115,7 +115,7 @@ public class Status extends SimpleStatus {
* Checks whether the status runstate is passed.
* Checks whether the status runstate is passed.
*/
*/
public
boolean
isPassed
()
{
public
boolean
isPassed
()
{
return
getRunState
()
==
PASSED
;
return
getRunState
()
==
RunState
.
PASSED
;
}
}
/**
/**
...
...
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