Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xulijie Li
MathsEngine
Commits
af571a61
Commit
af571a61
authored
May 03, 2021
by
BlackAngle233
Browse files
212
parent
1d9b5391
Changes
756
Hide whitespace changes
Inline
Side-by-side
Too many changes to show.
To preserve performance only
756 of 756+
files are displayed.
Plain diff
Email patch
MathTec/Library/PackageCache/com.unity.test-framework@1.1.14/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolStarter.cs
View file @
af571a61
using
System
;
using
System.Linq
;
using
UnityEditor.Compilation
;
using
UnityEditor.TestTools.TestRunner.Api
;
using
UnityEngine
;
using
UnityEngine.TestTools
;
namespace
UnityEditor.TestTools.TestRunner.UnityTestProtocol
{
[
InitializeOnLoad
]
internal
static
class
UnityTestProtocolStarter
{
static
UnityTestProtocolStarter
()
{
var
commandLineArgs
=
Environment
.
GetCommandLineArgs
();
if
(
commandLineArgs
.
Contains
(
"-automated"
)
&&
commandLineArgs
.
Contains
(
"-runTests"
))
// wanna have it only for utr run
{
var
api
=
ScriptableObject
.
CreateInstance
<
TestRunnerApi
>();
var
listener
=
ScriptableObject
.
CreateInstance
<
UnityTestProtocolListener
>();
api
.
RegisterCallbacks
(
listener
);
CompilationPipeline
.
assemblyCompilationFinished
+=
OnAssemblyCompilationFinished
;
}
}
public
static
void
OnAssemblyCompilationFinished
(
string
assembly
,
CompilerMessage
[]
messages
)
{
bool
checkCompileErrors
=
RecompileScripts
.
Current
==
null
||
RecompileScripts
.
Current
.
ExpectScriptCompilationSuccess
;
if
(
checkCompileErrors
&&
messages
.
Any
(
x
=>
x
.
type
==
CompilerMessageType
.
Error
))
{
var
compilerErrorMessages
=
messages
.
Where
(
x
=>
x
.
type
==
CompilerMessageType
.
Error
);
var
utpMessageReporter
=
new
UtpMessageReporter
(
new
UtpDebugLogger
());
utpMessageReporter
.
ReportAssemblyCompilationErrors
(
assembly
,
compilerErrorMessages
);
}
}
}
}
using
System
;
using
System.Linq
;
using
UnityEditor.Compilation
;
using
UnityEditor.TestTools.TestRunner.Api
;
using
UnityEngine
;
using
UnityEngine.TestTools
;
namespace
UnityEditor.TestTools.TestRunner.UnityTestProtocol
{
[
InitializeOnLoad
]
internal
static
class
UnityTestProtocolStarter
{
static
UnityTestProtocolStarter
()
{
var
commandLineArgs
=
Environment
.
GetCommandLineArgs
();
if
(
commandLineArgs
.
Contains
(
"-automated"
)
&&
commandLineArgs
.
Contains
(
"-runTests"
))
// wanna have it only for utr run
{
var
api
=
ScriptableObject
.
CreateInstance
<
TestRunnerApi
>();
var
listener
=
ScriptableObject
.
CreateInstance
<
UnityTestProtocolListener
>();
api
.
RegisterCallbacks
(
listener
);
CompilationPipeline
.
assemblyCompilationFinished
+=
OnAssemblyCompilationFinished
;
}
}
public
static
void
OnAssemblyCompilationFinished
(
string
assembly
,
CompilerMessage
[]
messages
)
{
bool
checkCompileErrors
=
RecompileScripts
.
Current
==
null
||
RecompileScripts
.
Current
.
ExpectScriptCompilationSuccess
;
if
(
checkCompileErrors
&&
messages
.
Any
(
x
=>
x
.
type
==
CompilerMessageType
.
Error
))
{
var
compilerErrorMessages
=
messages
.
Where
(
x
=>
x
.
type
==
CompilerMessageType
.
Error
);
var
utpMessageReporter
=
new
UtpMessageReporter
(
new
UtpDebugLogger
());
utpMessageReporter
.
ReportAssemblyCompilationErrors
(
assembly
,
compilerErrorMessages
);
}
}
}
}
MathTec/Library/PackageCache/com.unity.test-framework@1.1.14/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolStarter.cs.meta
View file @
af571a61
fileFormatVersion: 2
guid: 1ac58cb55fc8daf4abd3945a2bbbb0c5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 1ac58cb55fc8daf4abd3945a2bbbb0c5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
MathTec/Library/PackageCache/com.unity.test-framework@1.1.14/UnityEditor.TestRunner/UnityTestProtocol/UtpDebuglogger.cs
View file @
af571a61
using
UnityEngine
;
namespace
UnityEditor.TestTools.TestRunner.UnityTestProtocol
{
class
UtpDebugLogger
:
IUtpLogger
{
public
void
Log
(
Message
msg
)
{
var
msgJson
=
JsonUtility
.
ToJson
(
msg
);
Debug
.
LogFormat
(
LogType
.
Log
,
LogOption
.
NoStacktrace
,
null
,
"\n##utp:{0}"
,
msgJson
);
}
}
}
using
UnityEngine
;
namespace
UnityEditor.TestTools.TestRunner.UnityTestProtocol
{
class
UtpDebugLogger
:
IUtpLogger
{
public
void
Log
(
Message
msg
)
{
var
msgJson
=
JsonUtility
.
ToJson
(
msg
);
Debug
.
LogFormat
(
LogType
.
Log
,
LogOption
.
NoStacktrace
,
null
,
"\n##utp:{0}"
,
msgJson
);
}
}
}
MathTec/Library/PackageCache/com.unity.test-framework@1.1.14/UnityEditor.TestRunner/UnityTestProtocol/UtpDebuglogger.cs.meta
View file @
af571a61
fileFormatVersion: 2
guid: d0abdd8cb6b29a24c8ee19626ef741b9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: d0abdd8cb6b29a24c8ee19626ef741b9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
MathTec/Library/PackageCache/com.unity.test-framework@1.1.14/UnityEditor.TestRunner/UnityTestProtocol/UtpMessageReporter.cs
View file @
af571a61
using
System.Collections.Generic
;
using
System.Linq
;
using
UnityEditor.Compilation
;
using
UnityEditor.TestTools.TestRunner.Api
;
namespace
UnityEditor.TestTools.TestRunner.UnityTestProtocol
{
internal
class
UtpMessageReporter
:
IUtpMessageReporter
{
public
ITestRunnerApiMapper
TestRunnerApiMapper
;
public
IUtpLogger
Logger
;
public
UtpMessageReporter
(
IUtpLogger
utpLogger
)
{
TestRunnerApiMapper
=
new
TestRunnerApiMapper
();
Logger
=
utpLogger
;
}
public
void
ReportAssemblyCompilationErrors
(
string
assembly
,
IEnumerable
<
CompilerMessage
>
errorCompilerMessages
)
{
var
compilationErrorMessage
=
new
AssemblyCompilationErrorsMessage
{
assembly
=
assembly
,
errors
=
errorCompilerMessages
.
Select
(
x
=>
x
.
message
).
ToArray
()
};
Logger
.
Log
(
compilationErrorMessage
);
}
public
void
ReportTestRunStarted
(
ITestAdaptor
testsToRun
)
{
var
msg
=
TestRunnerApiMapper
.
MapTestToTestPlanMessage
(
testsToRun
);
Logger
.
Log
(
msg
);
}
public
void
ReportTestStarted
(
ITestAdaptor
test
)
{
if
(
test
.
IsSuite
)
return
;
var
msg
=
TestRunnerApiMapper
.
MapTestToTestStartedMessage
(
test
);
Logger
.
Log
(
msg
);
}
public
void
ReportTestFinished
(
ITestResultAdaptor
result
)
{
if
(
result
.
Test
.
IsSuite
)
return
;
var
msg
=
TestRunnerApiMapper
.
TestResultToTestFinishedMessage
(
result
);
Logger
.
Log
(
msg
);
}
}
}
using
System.Collections.Generic
;
using
System.Linq
;
using
UnityEditor.Compilation
;
using
UnityEditor.TestTools.TestRunner.Api
;
namespace
UnityEditor.TestTools.TestRunner.UnityTestProtocol
{
internal
class
UtpMessageReporter
:
IUtpMessageReporter
{
public
ITestRunnerApiMapper
TestRunnerApiMapper
;
public
IUtpLogger
Logger
;
public
UtpMessageReporter
(
IUtpLogger
utpLogger
)
{
TestRunnerApiMapper
=
new
TestRunnerApiMapper
();
Logger
=
utpLogger
;
}
public
void
ReportAssemblyCompilationErrors
(
string
assembly
,
IEnumerable
<
CompilerMessage
>
errorCompilerMessages
)
{
var
compilationErrorMessage
=
new
AssemblyCompilationErrorsMessage
{
assembly
=
assembly
,
errors
=
errorCompilerMessages
.
Select
(
x
=>
x
.
message
).
ToArray
()
};
Logger
.
Log
(
compilationErrorMessage
);
}
public
void
ReportTestRunStarted
(
ITestAdaptor
testsToRun
)
{
var
msg
=
TestRunnerApiMapper
.
MapTestToTestPlanMessage
(
testsToRun
);
Logger
.
Log
(
msg
);
}
public
void
ReportTestStarted
(
ITestAdaptor
test
)
{
if
(
test
.
IsSuite
)
return
;
var
msg
=
TestRunnerApiMapper
.
MapTestToTestStartedMessage
(
test
);
Logger
.
Log
(
msg
);
}
public
void
ReportTestFinished
(
ITestResultAdaptor
result
)
{
if
(
result
.
Test
.
IsSuite
)
return
;
var
msg
=
TestRunnerApiMapper
.
TestResultToTestFinishedMessage
(
result
);
Logger
.
Log
(
msg
);
}
}
}
MathTec/Library/PackageCache/com.unity.test-framework@1.1.14/UnityEditor.TestRunner/UnityTestProtocol/UtpMessageReporter.cs.meta
View file @
af571a61
fileFormatVersion: 2
guid: ebcc5f899d9277642868aeda9a17cbaf
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: ebcc5f899d9277642868aeda9a17cbaf
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
MathTec/Library/PackageCache/com.unity.test-framework@1.1.14/UnityEngine.TestRunner.meta
View file @
af571a61
fileFormatVersion: 2
guid: 950890083f4907541a6ed06d70959e49
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 950890083f4907541a6ed06d70959e49
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
MathTec/Library/PackageCache/com.unity.test-framework@1.1.14/UnityEngine.TestRunner/AssemblyInfo.cs
View file @
af571a61
using
System.Reflection
;
using
System.Runtime.CompilerServices
;
[
assembly
:
AssemblyTitle
(
"UnityEngine.TestRunner"
)]
[
assembly
:
InternalsVisibleTo
(
"UnityEditor.TestRunner"
)]
[
assembly
:
InternalsVisibleTo
(
"DynamicProxyGenAssembly2"
)]
[
assembly
:
InternalsVisibleTo
(
"Unity.PerformanceTesting"
)]
[
assembly
:
InternalsVisibleTo
(
"Unity.PerformanceTesting.Editor"
)]
[
assembly
:
InternalsVisibleTo
(
"Assembly-CSharp-testable"
)]
[
assembly
:
InternalsVisibleTo
(
"Assembly-CSharp-Editor-testable"
)]
[
assembly
:
InternalsVisibleTo
(
"UnityEngine.TestRunner.Tests"
)]
[
assembly
:
InternalsVisibleTo
(
"UnityEditor.TestRunner.Tests"
)]
[
assembly
:
InternalsVisibleTo
(
"Unity.PackageManagerUI.Editor"
)]
[
assembly
:
AssemblyVersion
(
"1.0.0"
)]
using
System.Reflection
;
using
System.Runtime.CompilerServices
;
[
assembly
:
AssemblyTitle
(
"UnityEngine.TestRunner"
)]
[
assembly
:
InternalsVisibleTo
(
"UnityEditor.TestRunner"
)]
[
assembly
:
InternalsVisibleTo
(
"DynamicProxyGenAssembly2"
)]
[
assembly
:
InternalsVisibleTo
(
"Unity.PerformanceTesting"
)]
[
assembly
:
InternalsVisibleTo
(
"Unity.PerformanceTesting.Editor"
)]
[
assembly
:
InternalsVisibleTo
(
"Assembly-CSharp-testable"
)]
[
assembly
:
InternalsVisibleTo
(
"Assembly-CSharp-Editor-testable"
)]
[
assembly
:
InternalsVisibleTo
(
"UnityEngine.TestRunner.Tests"
)]
[
assembly
:
InternalsVisibleTo
(
"UnityEditor.TestRunner.Tests"
)]
[
assembly
:
InternalsVisibleTo
(
"Unity.PackageManagerUI.Editor"
)]
[
assembly
:
AssemblyVersion
(
"1.0.0"
)]
MathTec/Library/PackageCache/com.unity.test-framework@1.1.14/UnityEngine.TestRunner/AssemblyInfo.cs.meta
View file @
af571a61
fileFormatVersion: 2
guid: cc22cc13b69c1094c85e176c008b9ef8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: cc22cc13b69c1094c85e176c008b9ef8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
MathTec/Library/PackageCache/com.unity.test-framework@1.1.14/UnityEngine.TestRunner/Assertions.meta
View file @
af571a61
fileFormatVersion: 2
guid: 1ad55f5ad04d1d045a1f287409c650dd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 1ad55f5ad04d1d045a1f287409c650dd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
MathTec/Library/PackageCache/com.unity.test-framework@1.1.14/UnityEngine.TestRunner/Assertions/AllocatingGCMemoryConstraint.cs
View file @
af571a61
using
System
;
using
NUnit.Framework
;
using
NUnit.Framework.Constraints
;
using
UnityEngine.Profiling
;
namespace
UnityEngine.TestTools.Constraints
{
public
class
AllocatingGCMemoryConstraint
:
Constraint
{
private
class
AllocatingGCMemoryResult
:
ConstraintResult
{
private
readonly
int
diff
;
public
AllocatingGCMemoryResult
(
IConstraint
constraint
,
object
actualValue
,
int
diff
)
:
base
(
constraint
,
actualValue
,
diff
>
0
)
{
this
.
diff
=
diff
;
}
public
override
void
WriteMessageTo
(
MessageWriter
writer
)
{
if
(
diff
==
0
)
writer
.
WriteMessageLine
(
"The provided delegate did not make any GC allocations."
);
else
writer
.
WriteMessageLine
(
"The provided delegate made {0} GC allocation(s)."
,
diff
);
}
}
private
ConstraintResult
ApplyTo
(
Action
action
,
object
original
)
{
var
recorder
=
Recorder
.
Get
(
"GC.Alloc"
);
// The recorder was created enabled, which means it captured the creation of the Recorder object itself, etc.
// Disabling it flushes its data, so that we can retrieve the sample block count and have it correctly account
// for these initial allocations.
recorder
.
enabled
=
false
;
#if !UNITY_WEBGL
recorder
.
FilterToCurrentThread
();
#endif
recorder
.
enabled
=
true
;
try
{
action
();
}
finally
{
recorder
.
enabled
=
false
;
#if !UNITY_WEBGL
recorder
.
CollectFromAllThreads
();
#endif
}
return
new
AllocatingGCMemoryResult
(
this
,
original
,
recorder
.
sampleBlockCount
);
}
public
override
ConstraintResult
ApplyTo
(
object
obj
)
{
if
(
obj
==
null
)
throw
new
ArgumentNullException
();
TestDelegate
d
=
obj
as
TestDelegate
;
if
(
d
==
null
)
throw
new
ArgumentException
(
string
.
Format
(
"The actual value must be a TestDelegate but was {0}"
,
obj
.
GetType
()));
return
ApplyTo
(()
=>
d
.
Invoke
(),
obj
);
}
public
override
ConstraintResult
ApplyTo
<
TActual
>(
ActualValueDelegate
<
TActual
>
del
)
{
if
(
del
==
null
)
throw
new
ArgumentNullException
();
return
ApplyTo
(()
=>
del
.
Invoke
(),
del
);
}
public
override
string
Description
{
get
{
return
"allocates GC memory"
;
}
}
}
}
using
System
;
using
NUnit.Framework
;
using
NUnit.Framework.Constraints
;
using
UnityEngine.Profiling
;
namespace
UnityEngine.TestTools.Constraints
{
public
class
AllocatingGCMemoryConstraint
:
Constraint
{
private
class
AllocatingGCMemoryResult
:
ConstraintResult
{
private
readonly
int
diff
;
public
AllocatingGCMemoryResult
(
IConstraint
constraint
,
object
actualValue
,
int
diff
)
:
base
(
constraint
,
actualValue
,
diff
>
0
)
{
this
.
diff
=
diff
;
}
public
override
void
WriteMessageTo
(
MessageWriter
writer
)
{
if
(
diff
==
0
)
writer
.
WriteMessageLine
(
"The provided delegate did not make any GC allocations."
);
else
writer
.
WriteMessageLine
(
"The provided delegate made {0} GC allocation(s)."
,
diff
);
}
}
private
ConstraintResult
ApplyTo
(
Action
action
,
object
original
)
{
var
recorder
=
Recorder
.
Get
(
"GC.Alloc"
);
// The recorder was created enabled, which means it captured the creation of the Recorder object itself, etc.
// Disabling it flushes its data, so that we can retrieve the sample block count and have it correctly account
// for these initial allocations.
recorder
.
enabled
=
false
;
#if !UNITY_WEBGL
recorder
.
FilterToCurrentThread
();
#endif
recorder
.
enabled
=
true
;
try
{
action
();
}
finally
{
recorder
.
enabled
=
false
;
#if !UNITY_WEBGL
recorder
.
CollectFromAllThreads
();
#endif
}
return
new
AllocatingGCMemoryResult
(
this
,
original
,
recorder
.
sampleBlockCount
);
}
public
override
ConstraintResult
ApplyTo
(
object
obj
)
{
if
(
obj
==
null
)
throw
new
ArgumentNullException
();
TestDelegate
d
=
obj
as
TestDelegate
;
if
(
d
==
null
)
throw
new
ArgumentException
(
string
.
Format
(
"The actual value must be a TestDelegate but was {0}"
,
obj
.
GetType
()));
return
ApplyTo
(()
=>
d
.
Invoke
(),
obj
);
}
public
override
ConstraintResult
ApplyTo
<
TActual
>(
ActualValueDelegate
<
TActual
>
del
)
{
if
(
del
==
null
)
throw
new
ArgumentNullException
();
return
ApplyTo
(()
=>
del
.
Invoke
(),
del
);
}
public
override
string
Description
{
get
{
return
"allocates GC memory"
;
}
}
}
}
MathTec/Library/PackageCache/com.unity.test-framework@1.1.14/UnityEngine.TestRunner/Assertions/AllocatingGCMemoryConstraint.cs.meta
View file @
af571a61
fileFormatVersion: 2
guid: d09858396dd7adb4bbdb22ea0c8c3a37
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: d09858396dd7adb4bbdb22ea0c8c3a37
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
MathTec/Library/PackageCache/com.unity.test-framework@1.1.14/UnityEngine.TestRunner/Assertions/ConstraintsExtensions.cs
View file @
af571a61
using
NUnit.Framework.Constraints
;
namespace
UnityEngine.TestTools.Constraints
{
public
static
class
ConstraintExtensions
{
public
static
AllocatingGCMemoryConstraint
AllocatingGCMemory
(
this
ConstraintExpression
chain
)
{
var
constraint
=
new
AllocatingGCMemoryConstraint
();
chain
.
Append
(
constraint
);
return
constraint
;
}
}
}
using
NUnit.Framework.Constraints
;
namespace
UnityEngine.TestTools.Constraints
{
public
static
class
ConstraintExtensions
{
public
static
AllocatingGCMemoryConstraint
AllocatingGCMemory
(
this
ConstraintExpression
chain
)
{
var
constraint
=
new
AllocatingGCMemoryConstraint
();
chain
.
Append
(
constraint
);
return
constraint
;
}
}
}
MathTec/Library/PackageCache/com.unity.test-framework@1.1.14/UnityEngine.TestRunner/Assertions/ConstraintsExtensions.cs.meta
View file @
af571a61
fileFormatVersion: 2
guid: 68a48d1900320ed458e118415857faf6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 68a48d1900320ed458e118415857faf6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
MathTec/Library/PackageCache/com.unity.test-framework@1.1.14/UnityEngine.TestRunner/Assertions/InvalidSignatureException.cs
View file @
af571a61
using
NUnit.Framework
;
using
NUnit.Framework.Interfaces
;
namespace
UnityEngine.TestTools.TestRunner
{
internal
class
InvalidSignatureException
:
ResultStateException
{
public
InvalidSignatureException
(
string
message
)
:
base
(
message
)
{
}
public
override
ResultState
ResultState
{
get
{
return
ResultState
.
NotRunnable
;
}
}
}
}
using
NUnit.Framework
;
using
NUnit.Framework.Interfaces
;
namespace
UnityEngine.TestTools.TestRunner
{
internal
class
InvalidSignatureException
:
ResultStateException
{
public
InvalidSignatureException
(
string
message
)
:
base
(
message
)
{
}
public
override
ResultState
ResultState
{
get
{
return
ResultState
.
NotRunnable
;
}
}
}
}
MathTec/Library/PackageCache/com.unity.test-framework@1.1.14/UnityEngine.TestRunner/Assertions/InvalidSignatureException.cs.meta
View file @
af571a61
fileFormatVersion: 2
guid: 9650d910fcaefb34cb45f121c1993892
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 9650d910fcaefb34cb45f121c1993892
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
MathTec/Library/PackageCache/com.unity.test-framework@1.1.14/UnityEngine.TestRunner/Assertions/Is.cs
View file @
af571a61
namespace
UnityEngine.TestTools.Constraints
{
public
class
Is
:
NUnit
.
Framework
.
Is
{
public
static
AllocatingGCMemoryConstraint
AllocatingGCMemory
()
{
return
new
AllocatingGCMemoryConstraint
();
}
}
}
namespace
UnityEngine.TestTools.Constraints
{
public
class
Is
:
NUnit
.
Framework
.
Is
{
public
static
AllocatingGCMemoryConstraint
AllocatingGCMemory
()
{
return
new
AllocatingGCMemoryConstraint
();
}
}
}
MathTec/Library/PackageCache/com.unity.test-framework@1.1.14/UnityEngine.TestRunner/Assertions/Is.cs.meta
View file @
af571a61
fileFormatVersion: 2
guid: 6d5833966abeadb429de247e4316eef4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 6d5833966abeadb429de247e4316eef4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
MathTec/Library/PackageCache/com.unity.test-framework@1.1.14/UnityEngine.TestRunner/Assertions/LogAssert.cs
View file @
af571a61
using
System.Text.RegularExpressions
;
using
UnityEngine.TestTools.Logging
;
namespace
UnityEngine.TestTools
{
public
static
class
LogAssert
{
public
static
void
Expect
(
LogType
type
,
string
message
)
{
LogScope
.
Current
.
ExpectedLogs
.
Enqueue
(
new
LogMatch
()
{
LogType
=
type
,
Message
=
message
});
}
public
static
void
Expect
(
LogType
type
,
Regex
message
)
{
LogScope
.
Current
.
ExpectedLogs
.
Enqueue
(
new
LogMatch
()
{
LogType
=
type
,
MessageRegex
=
message
});
}
public
static
void
NoUnexpectedReceived
()
{
LogScope
.
Current
.
NoUnexpectedReceived
();
}
public
static
bool
ignoreFailingMessages
{
get
{
return
LogScope
.
Current
.
IgnoreFailingMessages
;
}
set
{
if
(
value
!=
LogScope
.
Current
.
IgnoreFailingMessages
)
{
Debug
.
LogFormat
(
LogType
.
Log
,
LogOption
.
NoStacktrace
,
null
,
"\nIgnoreFailingMessages:"
+
(
value
?
"true"
:
"false"
));
}
LogScope
.
Current
.
IgnoreFailingMessages
=
value
;
}
}
}
}
using
System.Text.RegularExpressions
;
using
UnityEngine.TestTools.Logging
;
namespace
UnityEngine.TestTools
{
public
static
class
LogAssert
{
public
static
void
Expect
(
LogType
type
,
string
message
)
{
LogScope
.
Current
.
ExpectedLogs
.
Enqueue
(
new
LogMatch
()
{
LogType
=
type
,
Message
=
message
});
}
public
static
void
Expect
(
LogType
type
,
Regex
message
)
{
LogScope
.
Current
.
ExpectedLogs
.
Enqueue
(
new
LogMatch
()
{
LogType
=
type
,
MessageRegex
=
message
});
}
public
static
void
NoUnexpectedReceived
()
{
LogScope
.
Current
.
NoUnexpectedReceived
();
}
public
static
bool
ignoreFailingMessages
{
get
{
return
LogScope
.
Current
.
IgnoreFailingMessages
;
}
set
{
if
(
value
!=
LogScope
.
Current
.
IgnoreFailingMessages
)
{
Debug
.
LogFormat
(
LogType
.
Log
,
LogOption
.
NoStacktrace
,
null
,
"\nIgnoreFailingMessages:"
+
(
value
?
"true"
:
"false"
));
}
LogScope
.
Current
.
IgnoreFailingMessages
=
value
;
}
}
}
}
MathTec/Library/PackageCache/com.unity.test-framework@1.1.14/UnityEngine.TestRunner/Assertions/LogAssert.cs.meta
View file @
af571a61
fileFormatVersion: 2
guid: c97b794b51780d349a16826a4c7898d7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: c97b794b51780d349a16826a4c7898d7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Prev
1
…
27
28
29
30
31
32
33
34
35
…
38
Next
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