Merge branch 'master' into mono-2018-10

This commit is contained in:
Alexander Köplinger 2019-01-30 13:43:03 +01:00
Родитель bd1aa58d03 742f0df459
Коммит 8b21371437
46 изменённых файлов: 506 добавлений и 591 удалений

Просмотреть файл

@ -216,6 +216,14 @@ This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug repo
### <a name='BI1117'/>BI1117: The member '*' is decorated with [Static] and its container class * is decorated with [Category] this leads to hard to use code. Please inline * into * class.
### <a name='BI1118'/>[NullAllowed] should not be used on methods, like '*', but only on properties, parameters and return values.
The `[NullAllowed]` attribute should not be allowed on methods but it could break existing binding projects.
Historically it was used on property setters. However using the attribute on _other_ methods can be misleading, e.g. should it apply to all parameters, the return value... and its presence/action can be misinterpreted in code reviews leading to binding bugs.
To fix this warning use the `[NullAllowed]` attribute only on parameters, properties or return values.
<!-- 2xxx: reserved -->
<!-- 3xxx: reserved -->
<!-- 4xxx: reserved -->

Просмотреть файл

@ -22,10 +22,19 @@
cd "$(dirname "${BASH_SOURCE[0]}")/.."
WORKSPACE=$(pwd)
MARKDOWN_INDENT="&nbsp;&nbsp;&nbsp;&nbsp;"
echo "*** Comparing API & creating generator diff... ***"
export COMPARE_FAILURE_FILE=$TMPDIR/api-diff-compare-failures.txt
report_error ()
{
printf "🔥 [Failed to compare API and create generator diff](%s/console) 🔥\\n" "$BUILD_URL" >> "$WORKSPACE/jenkins/pr-comments.md"
if test -f "$COMPARE_FAILURE_FILE"; then
sed "s/^/${MARKDOWN_INDENT//&/\\&}/" "$COMPARE_FAILURE_FILE" >> "$WORKSPACE/jenkins/pr-comments.md"
fi
printf "${MARKDOWN_INDENT}Search for \`Comparing API & creating generator diff\` in the log to view the complete log.\\n" >> "$WORKSPACE/jenkins/pr-comments.md"
touch "$WORKSPACE/jenkins/failure-stamp"
rm -f "$COMPARE_FAILURE_FILE"
echo "*** Comparing API & creating generator diff failed ***"
exit 0
}
trap report_error ERR
@ -55,7 +64,7 @@ if ! git rev-parse "$BASE" >/dev/null 2>&1; then
exit 0
fi
./tools/compare-commits.sh --base="$BASE^1"
./tools/compare-commits.sh --base="$BASE^1" "--failure-file=$COMPARE_FAILURE_FILE"
mkdir -p jenkins-results/apicomparison
@ -89,3 +98,5 @@ else
printf "✅ [Generator Diff](%s) (only version changes)" "$URL_GENERATOR" >> "$WORKSPACE/jenkins/pr-comments.md"
fi
printf "\\n" >> "$WORKSPACE/jenkins/pr-comments.md"
echo "*** Comparing API & creating generator diff completed ***"

Просмотреть файл

@ -162,8 +162,8 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
<UsingTask
TaskName="GetDependsOnNETStandard"
Condition="'$(IsXBuild)' != 'true' and Exists('$(MSBuildExtensionsPath)\Microsoft\Microsoft.NET.Build.Extensions\tools\net46\Microsoft.NET.Build.Extensions.Tasks.dll')"
AssemblyFile="$(MSBuildExtensionsPath)\Microsoft\Microsoft.NET.Build.Extensions\tools\net46\Microsoft.NET.Build.Extensions.Tasks.dll" />
Condition="'$(IsXBuild)' != 'true'"
AssemblyFile="$(MicrosoftNETBuildExtensionsTasksAssembly)" />
<Target Name="ImplicitlyExpandDesignTimeFacades" Condition="'$(ImplicitlyExpandDesignTimeFacades)' == 'true'" DependsOnTargets="$(ImplicitlyExpandDesignTimeFacadesDependsOn)">
<ItemGroup>
@ -189,8 +189,7 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
If $(_HasReferenceToSystemRuntime) is true, then the facades are going to be expanded anyway, so don't run this.
-->
<GetDependsOnNETStandard
Condition="'$(_HasReferenceToSystemRuntime)' != 'true' and '$(IsXBuild)' != 'true' and '$(DependsOnNETStandard)' == '' and '@(XI_CandidateNETStandardReferences)' != ''
and Exists('$(MSBuildExtensionsPath)\Microsoft\Microsoft.NET.Build.Extensions\tools\net46\Microsoft.NET.Build.Extensions.Tasks.dll')"
Condition="'$(_HasReferenceToSystemRuntime)' != 'true' and '$(IsXBuild)' != 'true' and '$(DependsOnNETStandard)' == '' and '@(XI_CandidateNETStandardReferences)' != ''"
References="@(XI_CandidateNETStandardReferences)">
<Output TaskParameter="DependsOnNETStandard" PropertyName="XI_DependsOnNETStandard" />
</GetDependsOnNETStandard>

Просмотреть файл

@ -196,10 +196,6 @@
#region metadata/profiler.h
new Export ("void", "mono_profiler_set_events",
"MonoProfileFlags", "events"
),
new Export ("void", "mono_profiler_install",
"MonoProfiler *", "prof",
"MonoProfileFunc", "shutdown_callback"

Просмотреть файл

@ -864,10 +864,6 @@ gc_toggleref_callback (MonoObject *object)
return res;
}
typedef struct {
int dummy;
} NRCProfiler;
static void
gc_event_callback (MonoProfiler *prof, MonoGCEvent event, int generation)
{
@ -896,12 +892,9 @@ gc_enable_new_refcount (void)
pthread_mutex_init (&framework_peer_release_lock, &attr);
pthread_mutexattr_destroy (&attr);
NRCProfiler *prof = (NRCProfiler *) malloc (sizeof (NRCProfiler));
mono_gc_toggleref_register_callback (gc_toggleref_callback);
xamarin_add_internal_call (xamarin_use_new_assemblies ? "Foundation.NSObject::RegisterToggleRef" : PRODUCT_COMPAT_NAMESPACE ".Foundation.NSObject::RegisterToggleRef", (const void *) gc_register_toggleref);
mono_profiler_install ((MonoProfiler *) prof, NULL);
mono_profiler_install_gc (gc_event_callback, NULL);
}
@ -915,6 +908,19 @@ get_class_from_name (MonoImage* image, const char *nmspace, const char *name, bo
return rv;
}
struct _MonoProfiler {
int dummy;
};
static void
xamarin_install_mono_profiler ()
{
static _MonoProfiler profiler = { 0 };
// This must be done before any other mono_profiler_install_* functions are called
// (currently gc_enable_new_refcount and xamarin_install_nsautoreleasepool_hooks).
mono_profiler_install (&profiler, NULL);
}
bool
xamarin_file_exists (const char *path)
{
@ -1406,6 +1412,8 @@ xamarin_initialize ()
if (!register_assembly (assembly, &exception_gchandle))
xamarin_process_managed_exception_gchandle (exception_gchandle);
xamarin_install_mono_profiler (); // must be called before xamarin_install_nsautoreleasepool_hooks or gc_enable_new_refcount
xamarin_install_nsautoreleasepool_hooks ();
#if defined (DEBUG)

Просмотреть файл

@ -162,17 +162,6 @@ xamarin_initialize_cocoa_threads (init_cocoa_func *func)
static CFMutableDictionaryRef xamarin_thread_hash = NULL;
static pthread_mutex_t thread_hash_lock = PTHREAD_MUTEX_INITIALIZER;
struct _MonoProfiler {
int dummy;
};
static MonoProfiler*
create_thread_helper ()
{
// COOP: no managed memory access: any mode.
return (MonoProfiler *)malloc (sizeof (MonoProfiler));
}
static void
xamarin_thread_start (void *user_data)
{
@ -238,9 +227,7 @@ xamarin_install_nsautoreleasepool_hooks ()
// COOP: executed at startup (and no managed memory access): any mode.
xamarin_thread_hash = CFDictionaryCreateMutable (kCFAllocatorDefault, 0, NULL, NULL);
mono_profiler_install (create_thread_helper (), NULL);
mono_profiler_install_thread (thread_start, thread_end);
mono_profiler_set_events (MONO_PROFILE_THREADS);
}
/* Threads & Blocks

Просмотреть файл

@ -170,6 +170,7 @@ namespace CoreFoundation {
return Wait (new DispatchTime (DispatchTime.Now, timeout));
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void DispatchBlockCallback (IntPtr block);
public static explicit operator Action (DispatchBlock block)

Просмотреть файл

@ -168,6 +168,18 @@ namespace CoreMedia {
SetNumberValue (CMTextMarkupAttributesKeys.RelativeFontSize, value);
}
}
public float? BaseFontSizePercentageRelativeToVideoHeight {
get {
return GetFloatValue (CMTextMarkupAttributesKeys.BaseFontSizePercentageRelativeToVideoHeight);
}
set {
if (value < 0)
throw new ArgumentOutOfRangeException("value");
SetNumberValue (CMTextMarkupAttributesKeys.BaseFontSizePercentageRelativeToVideoHeight, value);
}
}
#endif
}
}

Просмотреть файл

@ -5337,69 +5337,69 @@ namespace AppKit {
[BaseType (typeof (NSObject))]
partial interface NSDocument /* : NSUserActivityRestoring radar://42781537 */ {
[Export ("initWithType:error:")]
IntPtr Constructor (string typeName, out NSError outError);
IntPtr Constructor (string typeName, [NullAllowed] out NSError outError);
[Static]
[Export ("canConcurrentlyReadDocumentsOfType:")]
bool CanConcurrentlyReadDocumentsOfType (string typeName);
[Export ("initWithContentsOfURL:ofType:error:")]
IntPtr Constructor (NSUrl url, string typeName, out NSError outError);
IntPtr Constructor (NSUrl url, string typeName, [NullAllowed] out NSError outError);
[Export ("initForURL:withContentsOfURL:ofType:error:")]
IntPtr Constructor ([NullAllowed] NSUrl documentUrl, NSUrl documentContentsUrl, string typeName, out NSError outError);
IntPtr Constructor ([NullAllowed] NSUrl documentUrl, NSUrl documentContentsUrl, string typeName, [NullAllowed] out NSError outError);
[Export ("revertDocumentToSaved:")]
void RevertDocumentToSaved (NSObject sender);
[Export ("revertDocumentToSaved:")]
void RevertDocumentToSaved ([NullAllowed] NSObject sender);
[Export ("revertToContentsOfURL:ofType:error:")]
bool RevertToContentsOfUrl (NSUrl url, string typeName, out NSError outError);
[Export ("revertToContentsOfURL:ofType:error:")]
bool RevertToContentsOfUrl (NSUrl url, string typeName, [NullAllowed] out NSError outError);
[Export ("readFromURL:ofType:error:")]
bool ReadFromUrl (NSUrl url, string typeName, out NSError outError);
bool ReadFromUrl (NSUrl url, string typeName, [NullAllowed] out NSError outError);
[Export ("readFromFileWrapper:ofType:error:")]
bool ReadFromFileWrapper (NSFileWrapper fileWrapper, string typeName, out NSError outError);
[Export ("readFromData:ofType:error:")]
bool ReadFromData (NSData data, string typeName, out NSError outError);
bool ReadFromData (NSData data, string typeName, [NullAllowed] out NSError outError);
[Export ("writeToURL:ofType:error:")]
bool WriteToUrl (NSUrl url, string typeName, out NSError outError);
bool WriteToUrl (NSUrl url, string typeName, [NullAllowed] out NSError outError);
[Export ("fileWrapperOfType:error:")]
NSFileWrapper GetAsFileWrapper (string typeName, out NSError outError);
NSFileWrapper GetAsFileWrapper (string typeName, [NullAllowed] out NSError outError);
[Export ("dataOfType:error:")]
NSData GetAsData (string typeName, out NSError outError);
NSData GetAsData (string typeName, [NullAllowed] out NSError outError);
[Export ("writeSafelyToURL:ofType:forSaveOperation:error:")]
bool WriteSafelyToUrl (NSUrl url, string typeName, NSSaveOperationType saveOperation, out NSError outError);
bool WriteSafelyToUrl (NSUrl url, string typeName, NSSaveOperationType saveOperation, [NullAllowed] out NSError outError);
[Export ("writeToURL:ofType:forSaveOperation:originalContentsURL:error:")]
bool WriteToUrl (NSUrl url, string typeName, NSSaveOperationType saveOperation, NSUrl absoluteOriginalContentsUrl, out NSError outError);
bool WriteToUrl (NSUrl url, string typeName, NSSaveOperationType saveOperation, [NullAllowed] NSUrl absoluteOriginalContentsUrl, [NullAllowed] out NSError outError);
[Export ("fileAttributesToWriteToURL:ofType:forSaveOperation:originalContentsURL:error:")]
NSDictionary FileAttributesToWrite (NSUrl toUrl, string typeName, NSSaveOperationType saveOperation, NSUrl absoluteOriginalContentsUrl, out NSError outError);
NSDictionary FileAttributesToWrite (NSUrl toUrl, string typeName, NSSaveOperationType saveOperation, [NullAllowed] NSUrl absoluteOriginalContentsUrl, [NullAllowed] out NSError outError);
[Export ("keepBackupFile")]
bool KeepBackupFile ();
[Export ("saveDocument:")]
void SaveDocument (NSObject sender);
void SaveDocument ([NullAllowed] NSObject sender);
[Export ("saveDocumentAs:")]
void SaveDocumentAs (NSObject sender);
void SaveDocumentAs ([NullAllowed] NSObject sender);
[Export ("saveDocumentTo:")]
void SaveDocumentTo (NSObject sender);
void SaveDocumentTo ([NullAllowed] NSObject sender);
[Export ("saveDocumentWithDelegate:didSaveSelector:contextInfo:")]
void SaveDocument (NSObject delegateObject, Selector didSaveSelector, IntPtr contextInfo);
void SaveDocument ([NullAllowed] NSObject delegateObject, [NullAllowed] Selector didSaveSelector, [NullAllowed] IntPtr contextInfo);
[Mac (10,9)]
[Export ("saveDocumentToPDF:")]
void SaveDocumentAsPdf (NSObject sender);
void SaveDocumentAsPdf ([NullAllowed] NSObject sender);
[Mac (10,9)]
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
@ -5407,7 +5407,7 @@ namespace AppKit {
NSPrintOperation PDFPrintOperation { get; }
[Export ("runModalSavePanelForSaveOperation:delegate:didSaveSelector:contextInfo:")]
void RunModalSavePanelForSaveOperation (NSSaveOperationType saveOperation, NSObject delegateObject, Selector didSaveSelector, IntPtr contextInfo);
void RunModalSavePanelForSaveOperation (NSSaveOperationType saveOperation, [NullAllowed] NSObject delegateObject, [NullAllowed] Selector didSaveSelector, [NullAllowed] IntPtr contextInfo);
[Export ("shouldRunSavePanelWithAccessoryView")]
bool ShouldRunSavePanelWithAccessoryView { get; }
@ -5422,31 +5422,32 @@ namespace AppKit {
string FileTypeFromLastRunSavePanel { get; }
[Export ("saveToURL:ofType:forSaveOperation:delegate:didSaveSelector:contextInfo:")]
void SaveToUrl (NSUrl url, string typeName, NSSaveOperationType saveOperation, NSObject delegateObject, Selector didSaveSelector, IntPtr contextInfo);
void SaveToUrl (NSUrl url, string typeName, NSSaveOperationType saveOperation, [NullAllowed] NSObject delegateObject, [NullAllowed] Selector didSaveSelector, [NullAllowed] IntPtr contextInfo);
[Export ("saveToURL:ofType:forSaveOperation:error:")]
bool SaveToUrl (NSUrl url, string typeName, NSSaveOperationType saveOperation, out NSError outError);
[Deprecated (PlatformName.MacOSX, 10, 6, message: "Use a 'SaveToUrl' overload accepting a completion handler instead.")]
bool SaveToUrl (NSUrl url, string typeName, NSSaveOperationType saveOperation, [NullAllowed] out NSError outError);
[Export ("hasUnautosavedChanges")]
bool HasUnautosavedChanges { get; }
[Export ("autosaveDocumentWithDelegate:didAutosaveSelector:contextInfo:")]
void AutosaveDocument (NSObject delegateObject, Selector didAutosaveSelector, IntPtr contextInfo);
void AutosaveDocument ([NullAllowed] NSObject delegateObject, [NullAllowed] Selector didAutosaveSelector, [NullAllowed] IntPtr contextInfo);
[Export ("autosavingFileType")]
string AutosavingFileType { get; }
[Export ("canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo:")]
void CanCloseDocument (NSObject delegateObject, Selector shouldCloseSelector, IntPtr contextInfo);
void CanCloseDocument (NSObject delegateObject, [NullAllowed] Selector shouldCloseSelector, [NullAllowed] IntPtr contextInfo);
[Export ("close")]
void Close ();
[Export ("runPageLayout:")]
void RunPageLayout (NSObject sender);
void RunPageLayout ([NullAllowed] NSObject sender);
[Export ("runModalPageLayoutWithPrintInfo:delegate:didRunSelector:contextInfo:")]
void RunModalPageLayout (NSPrintInfo printInfo, NSObject delegateObject, Selector didRunSelector, IntPtr contextInfo);
void RunModalPageLayout (NSPrintInfo printInfo, [NullAllowed] NSObject delegateObject, [NullAllowed] Selector didRunSelector, [NullAllowed] IntPtr contextInfo);
[Export ("preparePageLayout:")]
bool PreparePageLayout (NSPageLayout pageLayout);
@ -5455,16 +5456,16 @@ namespace AppKit {
bool ShouldChangePrintInfo (NSPrintInfo newPrintInfo);
[Export ("printDocument:")]
void PrintDocument (NSObject sender);
void PrintDocument ([NullAllowed] NSObject sender);
[Export ("printDocumentWithSettings:showPrintPanel:delegate:didPrintSelector:contextInfo:")]
void PrintDocument (NSDictionary printSettings, bool showPrintPanel, NSObject delegateObject, Selector didPrintSelector, IntPtr contextInfo);
void PrintDocument (NSDictionary printSettings, bool showPrintPanel, [NullAllowed] NSObject delegateObject, [NullAllowed] Selector didPrintSelector, [NullAllowed] IntPtr contextInfo);
[Export ("printOperationWithSettings:error:")]
NSPrintOperation PrintOperation (NSDictionary printSettings, out NSError outError);
NSPrintOperation PrintOperation (NSDictionary printSettings, [NullAllowed] out NSError outError);
[Export ("runModalPrintOperation:delegate:didRunSelector:contextInfo:")]
void RunModalPrintOperation (NSPrintOperation printOperation, NSObject delegateObject, Selector didRunSelector, IntPtr contextInfo);
void RunModalPrintOperation (NSPrintOperation printOperation, [NullAllowed] NSObject delegateObject, [NullAllowed] Selector didRunSelector, [NullAllowed] IntPtr contextInfo);
[Export ("isDocumentEdited")]
bool IsDocumentEdited { get; }
@ -5473,7 +5474,7 @@ namespace AppKit {
void UpdateChangeCount (NSDocumentChangeType change);
[Export ("presentError:modalForWindow:delegate:didPresentSelector:contextInfo:")]
void PresentError (NSError error, NSWindow window, [NullAllowed] NSObject delegateObject, [NullAllowed] Selector didPresentSelector, IntPtr contextInfo);
void PresentError (NSError error, NSWindow window, [NullAllowed] NSObject delegateObject, [NullAllowed] Selector didPresentSelector, [NullAllowed] IntPtr contextInfo);
[Export ("presentError:")]
bool PresentError (NSError error);
@ -5494,7 +5495,7 @@ namespace AppKit {
void WindowControllerDidLoadNib (NSWindowController windowController);
[Export ("setWindow:")]
void SetWindow (NSWindow window);
void SetWindow ([NullAllowed] NSWindow window);
[Export ("addWindowController:")]
[PostGet ("WindowControllers")]
@ -5511,7 +5512,7 @@ namespace AppKit {
NSWindowController [] WindowControllers { get; }
[Export ("shouldCloseWindowController:delegate:shouldCloseSelector:contextInfo:")]
void ShouldCloseWindowController (NSWindowController windowController, NSObject delegateObject, Selector shouldCloseSelector, IntPtr contextInfo);
void ShouldCloseWindowController (NSWindowController windowController, [NullAllowed] NSObject delegateObject, [NullAllowed] Selector shouldCloseSelector, [NullAllowed] IntPtr contextInfo);
[Export ("displayName")]
[NullAllowed]
@ -5605,7 +5606,7 @@ namespace AppKit {
bool CanWriteAsynchronously (NSUrl toUrl, string typeName, NSSaveOperationType saveOperation);
[Export ("checkAutosavingSafetyAndReturnError:")]
bool CheckAutosavingSafety (out NSError outError);
bool CheckAutosavingSafety ([NullAllowed] out NSError outError);
[Export ("scheduleAutosaving")]
void ScheduleAutosaving ();
@ -5622,13 +5623,13 @@ namespace AppKit {
bool PreservesVersions ();
[Export ("duplicateDocument:")]
void DuplicateDocument (NSObject sender);
void DuplicateDocument ([NullAllowed] NSObject sender);
[Export ("duplicateDocumentWithDelegate:didDuplicateSelector:contextInfo:"), Internal]
void _DuplicateDocument ([NullAllowed] NSObject cbackobject, [NullAllowed] Selector didDuplicateSelector, IntPtr contextInfo);
void _DuplicateDocument ([NullAllowed] NSObject cbackobject, [NullAllowed] Selector didDuplicateSelector, [NullAllowed] IntPtr contextInfo);
[Export ("duplicateAndReturnError:")]
NSDocument Duplicate (out NSError outError);
NSDocument Duplicate ([NullAllowed] out NSError outError);
[Export ("isInViewingMode")]
bool IsInViewingMode { get; }
@ -5693,7 +5694,7 @@ namespace AppKit {
[Mac (10,12)]
[Export ("stopBrowsingVersionsWithCompletionHandler:")]
[Async]
void StopBrowsingVersions (Action completionHandler);
void StopBrowsingVersions ([NullAllowed] Action completionHandler);
[Mac (10, 13)]
[Export ("allowsDocumentSharing")]
@ -25598,7 +25599,8 @@ namespace AppKit {
}
[Mac (10,12)]
[Protocol]
[Protocol, Model]
[BaseType (typeof (NSObject))]
interface NSFilePromiseProviderDelegate
{
[Abstract]

Просмотреть файл

@ -40,7 +40,11 @@ namespace CoreMedia {
[Internal][Field ("kCMTextMarkupAttribute_RelativeFontSize")]
NSString RelativeFontSize { get; }
}
[Internal]
[Field("kCMTextMarkupAttribute_BaseFontSizePercentageRelativeToVideoHeight")]
NSString BaseFontSizePercentageRelativeToVideoHeight { get; }
}
[Static][Internal]
interface CMSampleAttachmentKey {

Просмотреть файл

@ -4096,6 +4096,9 @@ public partial class Generator : IMemberGatherer {
if (null_allowed_override)
return;
if (AttributeManager.HasAttribute<NullAllowedAttribute> (mi))
ErrorHelper.Show (new BindingException (1118, false, $"[NullAllowed] should not be used on methods, like '{mi}', but only on properties, parameters and return values."));
foreach (var pi in mi.GetParameters ()) {
var needs_null_check = ParameterNeedsNullCheck (pi, mi, propInfo);
if (!needs_null_check)
@ -4526,7 +4529,7 @@ public partial class Generator : IMemberGatherer {
bool DoesPropertyNeedDirtyCheck (PropertyInfo pi, ExportAttribute ea)
{
switch (ea.ArgumentSemantic) {
switch (ea?.ArgumentSemantic) {
case ArgumentSemantic.Copy:
case ArgumentSemantic.Retain: // same as Strong
case ArgumentSemantic.None:
@ -4808,7 +4811,10 @@ public partial class Generator : IMemberGatherer {
if (pi.CanWrite){
var setter = pi.GetSetMethod ();
var ba = GetBindAttribute (setter);
bool null_allowed = AttributeManager.HasAttribute<NullAllowedAttribute> (pi) || AttributeManager.HasAttribute<NullAllowedAttribute> (setter);
bool null_allowed = AttributeManager.HasAttribute<NullAllowedAttribute> (setter);
if (null_allowed)
ErrorHelper.Show (new BindingException (1118, false, $"[NullAllowed] should not be used on methods, like '{setter}', but only on properties, parameters and return values."));
null_allowed |= AttributeManager.HasAttribute<NullAllowedAttribute> (pi);
var not_implemented_attr = AttributeManager.GetCustomAttribute<NotImplementedAttribute> (setter);
string sel;

Просмотреть файл

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -106,9 +106,6 @@
<Reference Include="xunit.runner.utility.netstandard20">
<HintPath>..\..\..\packages\xunit.runner.utility.2.4.0\lib\netstandard2.0\xunit.runner.utility.netstandard20.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization.Formatters.Soap">
<HintPath>..\..\..\external\mono\mcs\class\lib\monotouch\System.Runtime.Serialization.Formatters.Soap.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Options.ConfigurationExtensions">
<HintPath>..\..\..\packages\Microsoft.Extensions.Options.ConfigurationExtensions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll</HintPath>
</Reference>

Просмотреть файл

@ -173,9 +173,6 @@
<Reference Include="xunit.runner.utility.netstandard20">
<HintPath>..\..\..\packages\xunit.runner.utility.2.4.0\lib\netstandard2.0\xunit.runner.utility.netstandard20.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization.Formatters.Soap">
<HintPath>..\..\..\external\mono\mcs\class\lib\monotouch\System.Runtime.Serialization.Formatters.Soap.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Options.ConfigurationExtensions">
<HintPath>..\..\..\packages\Microsoft.Extensions.Options.ConfigurationExtensions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll</HintPath>
</Reference>

Просмотреть файл

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -132,9 +132,6 @@
<Reference Include="xunit.runner.utility.netstandard20">
<HintPath>..\..\..\packages\xunit.runner.utility.2.4.0\lib\netstandard2.0\xunit.runner.utility.netstandard20.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization.Formatters.Soap">
<HintPath>..\..\..\external\mono\mcs\class\lib\monotouch\System.Runtime.Serialization.Formatters.Soap.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Options.ConfigurationExtensions">
<HintPath>..\..\..\packages\Microsoft.Extensions.Options.ConfigurationExtensions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll</HintPath>
</Reference>

Просмотреть файл

@ -185,9 +185,6 @@
<Reference Include="xunit.runner.utility.netstandard20">
<HintPath>..\..\..\packages\xunit.runner.utility.2.4.0\lib\netstandard2.0\xunit.runner.utility.netstandard20.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization.Formatters.Soap">
<HintPath>..\..\..\external\mono\mcs\class\lib\monotouch\System.Runtime.Serialization.Formatters.Soap.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Options.ConfigurationExtensions">
<HintPath>..\..\..\packages\Microsoft.Extensions.Options.ConfigurationExtensions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll</HintPath>
</Reference>

Просмотреть файл

@ -1,2 +0,0 @@
# System.NotSupportedException : Cannot create boxed TypedReference, ArgIterator, or RuntimeArgumentHandle Objects.
MonoTests.System.Linq.Expressions.ExpressionTest_Call.Connect319190

Просмотреть файл

@ -2,33 +2,11 @@
Monotests_Mono.Data.SqlExpressions.DateComparisonTest.TestDateComparisonRight
Monotests_Mono.Data.SqlExpressions.DateComparisonTest.TestDateComparisonLeft
MonoTests.System.Data.XmlDataReaderTest.XmlLoadTest
MonoTests.System.Data.XmlDataReaderTest.Test6
MonoTests.System.Data.XmlDataReaderTest.Test5
MonoTests.System.Data.XmlDataReaderTest.Test4
MonoTests.System.Data.XmlDataReaderTest.Test3
MonoTests.System.Data.XmlDataReaderTest.Test2
MonoTests.System.Data.XmlDataReaderTest.Test1
MonoTests.System.Data.XmlDataReaderTest.Navigator
MonoTests.System.Data.XmlDataReaderTest.GetRowFromElement
MonoTests.System.Data.XmlDataReaderTest.GetElementFromRow
MonoTests.System.Data.XmlDataReaderTest.EditingXmlTree
MonoTests.System.Data.XmlDataReaderTest.EditingDataSet
MonoTests.System.Data.XmlDataReaderTest.CreateElement3
MonoTests.System.Data.XmlDataReaderTest.CreateElement2
MonoTests.System.Data.XmlDataReaderTest.CreateElement1
MonoTests.System.Data.XmlDataReaderTest.CloneNode
# System.NotSupportedException : Encoding 1252 data could not be found. Make sure you have correct international codeset assembly installed and enabled.
MonoTests.System.Data.SqlTypes.SqlStringTest.UnicodeBytes
MonoTests.System.Data.SqlTypes.SqlStringTest.Create
# System.FormatException : Input string was not in a correct format.
MonoTests.System.Data.SqlTypes.SqlInt64Test.ReadWriteXmlTest
MonoTests.System.Data.SqlTypes.SqlInt32Test.ReadWriteXmlTest
MonoTests.System.Data.SqlTypes.SqlInt16Test.ReadWriteXmlTest
MonoTests.System.Data.SqlTypes.SqlDoubleTest.ReadWriteXmlTest
MonoTests.System.Data.SqlTypes.SqlDecimalTest.ReadWriteXmlTest
# System.IO.DirectoryNotFoundException : Could not find a part of the path
MonoTests.System.Data.Xml.XmlDataDocumentTest.Test6
MonoTests.System.Data.Xml.XmlDataDocumentTest.Test5
@ -46,59 +24,14 @@ MonoTests.System.Data.Xml.XmlDataDocumentTest.CreateElement2
MonoTests.System.Data.Xml.XmlDataDocumentTest.CreateElement1
MonoTests.System.Data.Xml.XmlDataDocumentTest.CloneNode
# System.NotSupportedException : The keyword 'connection reset' is not supported on this platform.
MonoTests.System.Data.SqlClient.SqlConnectionTest.ConnectionString_OtherKeywords
# System.NotSupportedException : The keyword 'Network Library' is not supported on this platform, prefix the 'Data Source' with the protocol desired instead ('tcp:' for a TCP connection, or 'np:' for a Named Pipe connection).
MonoTests.System.Data.SqlClient.SqlConnectionTest.ConnectionString_NetworkLibrary_Synonyms
# System.NotSupportedException : The keyword 'asynchronous processing' is not supported on this platform.
MonoTests.System.Data.SqlClient.SqlConnectionTest.ConnectionString_AsynchronousProcessing
# #6
# Expected: True
# But was: False
MonoTests.System.Data.SqlClient.SqlConnectionTest.ChangePassword_ConnectionString_Null
MonoTests.System.Data.SqlClient.SqlConnectionTest.ChangePassword_ConnectionString_Empty
# Expected string length 568 but was 512. Strings differ at index 70.
# Expected: "...ertyDescriptorChanged,0,0\n----- UpdateIndex : True\n---- On..."
# But was: "...ertyDescriptorChanged,0,0\n---- OnListChanged Reset,-1,-1\nt..."
MonoTests.System.Data.DataViewTest.ComplexEventSequence2
# Expected string length 1316 but was 1214. Strings differ at index 70.
# Expected: "...ertyDescriptorChanged,0,0\n----- UpdateIndex : True\n---- On..."
# But was: "...ertyDescriptorChanged,0,0\n---- OnListChanged Reset,-1,-1\nt..."
MonoTests.System.Data.DataViewTest.ComplexEventSequence1
# #9
# String lengths are both 11. Strings differ at index 10.
# Expected: "Constraint1"
# But was: "Constraint2"
MonoTests.System.Data.DataTableTest3.XmlSchemaTest4
# System.IO.DirectoryNotFoundException : Could not find a part of the path
MonoTests.System.Data.DataTableTest3.WriteXmlSchema
MonoTests.System.Data.DataTableTest3.ReadXmlSchema
MonoTests.System.Data.DataTableReadXmlSchemaTest.TestSampleFileXPath
MonoTests.System.Data.DataTableReadXmlSchemaTest.TestSampleFileSimpleTables
MonoTests.System.Data.DataTableReadXmlSchemaTest.TestSampleFileImportSimple
# An unexpected exception type was thrown
# Expected: System.NullReferenceException
# but was: System.IO.DirectoryNotFoundException : Could not find a part of the path
MonoTests.System.Data.DataTableReadXmlSchemaTest.TestSampleFileComplexTablesExp2
MonoTests.System.Data.DataTableReadXmlSchemaTest.TestSampleFileComplexTablesExp1
# System.IO.DirectoryNotFoundException : Could not find a part of the path
MonoTests.System.Data.DataTableReadXmlSchemaTest.TestSampleFileComplexTables3
MonoTests.System.Data.DataTableReadXmlSchemaTest.TestSampleFileComplexTables2
# System.IO.DirectoryNotFoundException : Could not find a part of the path
MonoTests.System.Data.DataTableReadXmlSchemaTest.TestMoreThanOneRepeatableColumns
MonoTests.System.Data.DataTableReadXmlSchemaTest.TestAnnotatedRelation2
MonoTests.System.Data.DataTableReadXmlSchemaTest.TestAnnotatedRelation1
MonoTests.System.Data.DataTableReadXmlSchemaTest.RepeatableSimpleElement
MonoTests.System.Data.DataTableReadXmlSchemaTest.ReadConstraints
MonoTests.System.Data.DataTableReadXmlSchemaTest.ReadAnnotatedRelations_MultipleColumns
MonoTests.System.Data.DataTableTest.WriteXmlSchema
@ -109,11 +42,6 @@ MonoTests.System.Data.DataSetTest2.ReadXmlSchema_Nested
MonoTests.System.Data.DataSetTest2.Merge_ConstraintsFromReadXmlSchema
MonoTests.System.Data.DataSetTest.WriteXmlSchema
# Expected string length 1817 but was 918. Strings differ at index 1.
# Expected: "<xs:schema id='NewDataSet' targetNamespace='urn:bar' xmlns:ms..."
# But was: "<?xml version='1.0' encoding='utf-16'?>\n<xs:schema id='NewDat..."
MonoTests.System.Data.DataSetTest.WriteDifferentNamespaceSchema
# System.IO.DirectoryNotFoundException : Could not find a part of the path
MonoTests.System.Data.DataSetTest.ReadXmlSchema
MonoTests.System.Data.DataSetTest.ReadWriteXmlDiffGram
@ -123,9 +51,7 @@ MonoTests.System.Data.DataSetReadXmlTest.DataSetExtendedPropertiesTest
MonoTests.System.Data.DataSetReadXmlSchemaTest.TestSampleFileXPath
MonoTests.System.Data.DataSetReadXmlSchemaTest.TestSampleFileSimpleTables
MonoTests.System.Data.DataSetReadXmlSchemaTest.TestSampleFileNoTables
MonoTests.System.Data.DataSetReadXmlSchemaTest.TestSampleFileImportSimple
MonoTests.System.Data.DataSetReadXmlSchemaTest.TestSampleFileComplexTables3
MonoTests.System.Data.DataSetReadXmlSchemaTest.TestSampleFileComplexTables2
MonoTests.System.Data.DataSetReadXmlSchemaTest.TestSampleFileComplexTables
MonoTests.System.Data.DataSetReadXmlSchemaTest.TestMoreThanOneRepeatableColumns
MonoTests.System.Data.DataSetReadXmlSchemaTest.TestAnnotatedRelation2
@ -135,30 +61,4 @@ MonoTests.System.Data.DataSetReadXmlSchemaTest.ReadConstraints
MonoTests.System.Data.DataSetReadXmlSchemaTest.ReadAnnotatedRelations_MultipleColumns
MonoTests.System.Data.DataRelationTest.RelationFromSchema
MonoTests.System.Data.BinarySerializationTest.Test_With_Null_Values2
MonoTests.System.Data.BinarySerializationTest.Test_With_DateTime_Values2
MonoTests.System.Data.BinarySerializationTest.DataTableSerializationTest2
MonoTests.System.Data.BinarySerializationTest.DataSetSerializationTest2
MonoTests.System.Data.BinarySerializationTest.Constraint_Relations_Test2
# System.ArgumentException was expected
MonoTests.System.Data.DataSetInferXmlSchemaTest.ComplexElementTable1
# System.NotSupportedException : The keyword 'Context Connection' is not supported on this platform.
MonoTests.System.Data.Connected.SqlClient.SqlConnectionStringBuilderTest.SettingContextConnectionTest
# System.NotSupportedException : The keyword 'Network Library' is not supported on this platform, prefix the 'Data Source' with the protocol desired instead ('tcp:' for a TCP connection, or 'np:' for a Named Pipe connection).
MonoTests.System.Data.Common.SqlConnectionStringBuilderTest.RemoveTest
MonoTests.System.Data.Connected.SqlClient.SqlConnectionStringBuilderTest.RemoveTest
MonoTests.System.Data.Common.SqlConnectionStringBuilderTest.ItemTest
MonoTests.System.Data.Connected.SqlClient.SqlConnectionStringBuilderTest.ItemTest
MonoTests.System.Data.Connected.SqlClient.SqlConnectionStringBuilderTest.InvalidKeyTest
MonoTests.System.Data.Common.SqlConnectionStringBuilderTest.InvalidKeyTest
# #PT1 boolean value must be true
# Expected: True
# But was: False
MonoTests.System.Data.Connected.SqlClient.SqlConnectionStringBuilderTest.PropertiesTest
MonoTests.System.Data.Common.SqlConnectionStringBuilderTest.PropertiesTest
# System.NotImplementedException : The method or operation is not implemented.
MonoTests.System.Data.Connected.SqlClient.SqlConnectionStringBuilderTest.ContextConnectionTest
MonoTests.System.Data.BinarySerializationTest.DataTableSerializationTest2

Просмотреть файл

@ -60,8 +60,3 @@ MonoTests.System.Net.Http.HttpClientTest.Post_TransferEncodingChunked
# Expected: False
# But was: True
MonoTests.System.Net.Http.HttpClientTest.Post_StreamCaching
# #3
# Expected: True
# But was: False
MonoTests.System.Net.Http.HttpClientTest.Send_Complete_Content_MaxResponseContentBufferSize_Error

Просмотреть файл

@ -0,0 +1,14 @@
# An unexpected exception type was thrown
# Expected: System.Security.Cryptography.CryptographicException
# but was: System.PlatformNotSupportedException : The recipients collection is empty. You must specify at least one recipient. This platform does not implement the certificate picker UI.
MonoTests.System.Security.Cryptography.Pkcs.EnvelopedCmsTest.EncryptEmpty
# System.Security.Cryptography.CryptographicException : The enveloped-data message does not contain the specified recipient.
MonoTests.System.Security.Cryptography.Pkcs.EnvelopedCmsTest.EncryptCmsRecipientUnknown
MonoTests.System.Security.Cryptography.Pkcs.EnvelopedCmsTest.EncryptCmsRecipientIssuerAndSerialNumber
# ContentEncryptionAlgorithm.Parameters
# Expected: 16
# But was: 0
MonoTests.System.Security.Cryptography.Pkcs.EnvelopedCmsTest.Decrypt
MonoTests.System.Security.Cryptography.Pkcs.EnvelopedCmsTest.Decode

Просмотреть файл

@ -1,17 +0,0 @@
# The following ignores have been reported in the issue:
# issue https://github.com/xamarin/maccore/issues/1137
# An unexpected exception type was thrown
MonoTests.System.ServiceModel.Description.JsonQueryStringConverterTest.ConvertStringToValueInvalidCast2
# An unexpected exception type was thrown
MonoTests.System.ServiceModel.Description.QueryStringConverterTest.ConvertStringToValueInvalidCast2
# Should result in invalid operation
MonoTests.System.ServiceModel.Description.WebHttpBehaviorTest.MultipleParameters2
# System.ArgumentException : baseAddress scheme must be either http or https.
MonoTests.System.UriTemplateTest.BindByNameFileUriBaseAddress
# System.ArgumentException : baseAddress scheme must be either http or https.
MonoTests.System.UriTemplateTest.BindByPositionFileUriBaseAddress

Просмотреть файл

@ -1,330 +0,0 @@
# Expected: True
# But was: False
MonoTests.System.Net.WebClientTest.UploadFileAsyncCancelEvent
MonoTests.System.Net.WebClientTest.UploadDataAsyncCancelEvent
MonoTests.System.Net.WebClientTest.OpenReadTaskAsyncOnFile
# System.Net.WebException : maximum number of service points reached
# ----> System.InvalidOperationException : maximum number of service points reached
MonoTests.System.Net.WebClientTest.GetWebRequestOverriding
MonoTests.System.Net.WebClientTest.DownloadTwice
# Expected: True
# But was: False
MonoTests.System.Net.WebClientTest.UploadValuesAsyncCancelEvent
MonoTests.System.Net.WebClientTest.UploadStringAsyncCancelEvent
# System.Net.WebException : maximum number of service points reached
# ----> System.InvalidOperationException : maximum number of service points reached
MonoTests.System.Net.WebClientTest.UploadValues1
# System.Net.Sockets.SocketException : Not enough buffer space is available
MonoTests.System.Net.Sockets.UdpClientTest.JoinMulticastGroupWithLocal
MonoTests.System.Net.Sockets.UdpClientTest.JoinMulticastGroup1_Socket_NotBound
# #3
# Expected: 10022
# But was: 10049
MonoTests.System.Net.Sockets.SocketTest.SetSocketOption3_DropMembershipIPv6_Socket_NotBound
MonoTests.System.Net.Sockets.SocketTest.SetSocketOption3_DropMembershipIPv4_Socket_NotBound
# #1
# at MonoTests.System.Net.Sockets.SocketTest.SetSocketOption3_AddMembershipIPv6_Socket_NotBound ()
MonoTests.System.Net.Sockets.SocketTest.SetSocketOption3_AddMembershipIPv6_Socket_NotBound
MonoTests.System.Net.Sockets.SocketTest.SetSocketOption3_AddMembershipIPv4_Socket_NotBound
# System.ArgumentException : Value does not fall within the expected range.
MonoTests.System.Net.Sockets.SocketTest.SetSocketOption2_Linger
# SendBufferSizeDefault
# Expected: 8192
# But was: 131072
MonoTests.System.Net.Sockets.SocketTest.SendBufferSizeDefault
# ReceiveBufferSizeDefault
# Expected: 8192
# But was: 131072
MonoTests.System.Net.Sockets.SocketTest.ReceiveBufferSizeDefault
# System.Net.Sockets.SocketException : Invalid arguments
MonoTests.System.Net.Sockets.SocketTest.DontFragment
# System.Net.Sockets.SocketException : Operation on non-blocking socket would block
MonoTests.System.Net.Sockets.SocketTest.ConnectHostPortNotIP
# System.ArgumentException : Value does not fall within the expected range.
MonoTests.System.Net.Sockets.SocketTest.BuffersCheck_None
# System.Net.Sockets.SocketException : Operation on non-blocking socket would block
MonoTests.System.Net.Sockets.SocketTest.BeginConnectHostPortNotIP
##0
# Expected: True
# But was: False
MonoTests.System.Net.Sockets.SocketTest.BeginConnectMultiple
# SendBufferSizeDefaultUdp
# Expected: 8192
# But was: 9216
MonoTests.System.Net.Sockets.SocketTest.SendBufferSizeDefaultUdp
# ReceiveBufferSizeDefaultUdp
# Expected: 8192
# But was: 196724
MonoTests.System.Net.Sockets.SocketTest.ReceiveBufferSizeDefaultUdp
# DontFragmentChangeUdp
# Expected: True
# But was: False
MonoTests.System.Net.Sockets.SocketTest.DontFragmentChangeUdp
# DontFragmentChangeTcp
# Expected: True
# But was: False
MonoTests.System.Net.Sockets.SocketTest.DontFragmentChangeTcp
# System.Net.Sockets.SocketException : Invalid arguments
MonoTests.System.Net.Sockets.SocketTest.ConnectMultiple
# #A2
# Expected: True
# But was: False
MonoTests.System.Net.ServicePointTest.EndPointBind
# System.Net.WebException : The operation has timed out.
MonoTests.System.Net.ServicePointTest.All
# #A3
# Expected: not null
# But was: null
MonoTests.System.Net.HttpWebRequestTest.NoContentLength
# Should result in 304
MonoTests.System.Net.HttpWebRequestTest.LastModifiedKind
# System.Net.WebException : Value cannot be null.
MonoTests.System.Net.HttpWebRequestTest.EndGetResponse_AsyncResult_Invalid
# #02
# Expected: 1
# But was: 0
MonoTests.System.Net.HttpWebRequestTest.Cookies1
# #A1
# at MonoTests.System.Net.HttpResponseStreamTest.Read_Stream_Closed () [0x000a3] in /Users/builder/jenkins/workspace/archive-mono/2018-08/ios/release/mcs/class/System/Test/System.Net/HttpWebResponseTest.cs:1083
MonoTests.System.Net.HttpResponseStreamTest.Read_Stream_Closed
# #2
# Expected: False
# But was: True
MonoTests.System.Net.HttpResponseStreamTest.CanRead
# #1
# at MonoTests.System.Net.HttpRequestStreamTest.Write_Stream_Closed () [0x00072] in /Users/builder/jenkins/workspace/archive-mono/2018-08/ios/release/mcs/class/System/Test/System.Net/HttpWebRequestTest.cs:3224
MonoTests.System.Net.HttpResponseStreamTest.Write_Stream_Closed
# #A2
# at MonoTests.System.Net.FileWebRequestTest.GetRequestStream () [0x00049] in /Users/builder/jenkins/workspace/archive-mono/2018-08/ios/release/mcs/class/System/Test/System.Net/FileWebRequestTest.cs:418
MonoTests.System.Net.FileWebRequestTest.GetRequestStream
# Expected and actual are both <System.Byte[781]>
# Values differ at index [43]
# Expected: 48
# But was: 53
MonoTests.System.Net.FileWebRequestTest.Serialize
# Expected and actual are both <System.Byte[329]>
# Values differ at index [43]
# Expected: 48
# But was: 53
MonoTests.System.Collections.Generic.QueueTest.SerializeTest
# Expected and actual are both <System.Byte[305]>
# Values differ at index [43]
# Expected: 48
# But was: 53
MonoTests.System.Collections.Generic.StackTest.SerializeTest
# System.ComponentModel.Win32Exception : Cannot find the specified file
MonoTests.System.Diagnostics.ProcessTest.TestExitedRaisedTooSoon
# System.IO.DirectoryNotFoundException : Could not find a part of the path
MonoTests.System.IO.Compression.DeflateStreamTest.Bug44994_InflateByteByByte
# Gets blocked
MonoTests.System.Net.WebClientTest.UploadFileAsyncContentType
MonoTests.System.Net.WebRequestTest.TestReceiveCancelation
# !Equal
MonoTests.System.Timers.TimersDescriptionAttributeTest.ExistingResourceName
# Description
# Expected: null
# But was: "Mono"
MonoTests.System.Timers.TimersDescriptionAttributeTest.AnyString
# An unexpected exception type was thrown
# Expected: System.Threading.WaitHandleCannotBeOpenedException
# but was: System.NotSupportedException : Specified method is not supported.
MonoTests.System.Threading.SemaphoreTest.OpenExisting_Unexisting
# System.NotSupportedException : Specified method is not supported.
MonoTests.System.Threading.SemaphoreTest.OpenExisting_BadRights
# System.PlatformNotSupportedException : Operation is not supported on this platform.
MonoTests.System.Threading.SemaphoreTest.AccessControl_Unnamed
# Matching input 'F<>' against pattern '\p{IsHebrew}' with options 'None'
# Expected string length 20 but was 5. Strings differ at index 0.
# Expected: "Pass. Group[0]=(1,1)"
# But was: "Fail."
MonoTests.System.Text.RegularExpressions.RegexMatchTests.RegexJvmTrial0018
# Matching input 'F2345678910L70' against pattern '(F)(2)(3)(?<S>4)(5)(6)(?'S'7)(8)(9)(10)(L)(?(K)|\10)' with options 'None'
# String lengths are both 178. Strings differ at index 5.
# Expected: "Pass.\tGroup[0]=(0,13) Group[1]=(0,1) Group[2]=(1,1) Group[3]=..."
# But was: "Pass. Group[0]=(0,13) Group[1]=(0,1) Group[2]=(1,1) Group[3]=..."
MonoTests.System.Text.RegularExpressions.RegexMatchTests.RegexJvmTrial0016
# Matching input 'F2345678910L70' against pattern '(F)(2)(3)(?<S>4)(5)(6)(?'S'7)(8)(9)(10)(L)(?(7)|\10)' with options 'None'
# String lengths are both 178. Strings differ at index 5.
# Expected: "Pass.\tGroup[0]=(0,12) Group[1]=(0,1) Group[2]=(1,1) Group[3]=..."
# But was: "Pass. Group[0]=(0,12) Group[1]=(0,1) Group[2]=(1,1) Group[3]=..."
MonoTests.System.Text.RegularExpressions.RegexMatchTests.RegexJvmTrial0015
# Matching input 'F2345678910L70' against pattern '(F)(2)(3)(?<S>4)(5)(6)(?'S'7)(8)(9)(10)(L)(?(S)|\10)' with options 'None'
# String lengths are both 178. Strings differ at index 5.
# Expected: "Pass.\tGroup[0]=(0,12) Group[1]=(0,1) Group[2]=(1,1) Group[3]=..."
# But was: "Pass. Group[0]=(0,12) Group[1]=(0,1) Group[2]=(1,1) Group[3]=..."
MonoTests.System.Text.RegularExpressions.RegexMatchTests.RegexJvmTrial0014
# Matching input 'F2345678910L70' against pattern '(F)(2)(3)(?<S>4)(5)(6)(?'S'7)(8)(9)(10)(L)(?(10)\10)' with options 'None'
# String lengths are both 178. Strings differ at index 5.
# Expected: "Pass.\tGroup[0]=(0,13) Group[1]=(0,1) Group[2]=(1,1) Group[3]=..."
# But was: "Pass. Group[0]=(0,13) Group[1]=(0,1) Group[2]=(1,1) Group[3]=..."
MonoTests.System.Text.RegularExpressions.RegexMatchTests.RegexJvmTrial0013
# Matching input 'F2345678910L71' against pattern '(F)(2)(3)(?<S>4)(5)(6)(?'S'7)(8)(9)(10)(L)\10' with options 'None'
# String lengths are both 178. Strings differ at index 5.
# Expected: "Pass.\tGroup[0]=(0,13) Group[1]=(0,1) Group[2]=(1,1) Group[3]=..."
# But was: "Pass. Group[0]=(0,13) Group[1]=(0,1) Group[2]=(1,1) Group[3]=..."
MonoTests.System.Text.RegularExpressions.RegexMatchTests.RegexJvmTrial0009
# [FAIL] RegexMatchTests.RegexJvmTrial0008 : Matching input 'F2345678910L71' against pattern '(F)(2)(3)(4)(5)(6)(?<S>7)(8)(9)(10)(L)\11' with options 'None'
# String lengths are both 189. Strings differ at index 5.
# Expected: "Pass.\tGroup[0]=(0,13) Group[1]=(0,1) Group[2]=(1,1) Group[3]=..."
# But was: "Pass. Group[0]=(0,13) Group[1]=(0,1) Group[2]=(1,1) Group[3]=..."
MonoTests.System.Text.RegularExpressions.RegexMatchTests.RegexJvmTrial0008
# Matching input 'abc' against pattern '(a)(?<2>b)(c)' with options 'None'
# String lengths are both 55. Strings differ at index 42.
# Expected: "Pass. Group[0]=(0,3) Group[1]=(0,1) Group[1]=(1,1)(2,1)"
# But was: "Pass. Group[0]=(0,3) Group[1]=(0,1) Group[2]=(1,1)(2,1)"
MonoTests.System.Text.RegularExpressions.RegexMatchTests.RegexJvmTrial0002
# An unexpected exception type was thrown
# Expected: System.Security.Cryptography.CryptographicException
# but was: System.ArgumentException : rawData
MonoTests.System.Security.Cryptography.X509Certificates.X509Certificate2CollectionTest.Export_Single_SerializedStore
# System.NotSupportedException : Specified method is not supported.
MonoTests.System.Security.Cryptography.X509Certificates.X509Certificate2CollectionTest.Export_Single_SerializedCert
# An unexpected exception type was thrown
# Expected: System.Security.Cryptography.CryptographicException
# but was: System.ArgumentException : rawData
MonoTests.System.Security.Cryptography.X509Certificates.X509Certificate2CollectionTest.Export_Single_Pkcs7
# GetCertContentType
# Expected: Pfx
# But was: Unknown
MonoTests.System.Security.Cryptography.X509Certificates.X509Certificate2CollectionTest.Export_Single_Pkcs12
# GetCertContentType
# Expected: Pfx
# But was: Unknown
MonoTests.System.Security.Cryptography.X509Certificates.X509Certificate2CollectionTest.Export_Single_Pfx
# An unexpected exception type was thrown
# Expected: System.Security.Cryptography.CryptographicException
# but was: System.ArgumentException : rawData
MonoTests.System.Security.Cryptography.X509Certificates.X509Certificate2CollectionTest.Export_Multiple_SerializedStore
# System.NotSupportedException : Specified method is not supported.
MonoTests.System.Security.Cryptography.X509Certificates.X509Certificate2CollectionTest.Export_Multiple_SerializedCert
# An unexpected exception type was thrown
# Expected: System.Security.Cryptography.CryptographicException
# but was: System.ArgumentException : rawData
MonoTests.System.Security.Cryptography.X509Certificates.X509Certificate2CollectionTest.Export_Multiple_Pkcs7
# GetCertContentType
# Expected: Pfx
# But was: Unknown
MonoTests.System.Security.Cryptography.X509Certificates.X509Certificate2CollectionTest.Export_Multiple_Pkcs12
# GetCertContentType
# Expected: Pfx
# But was: Unknown
MonoTests.System.Security.Cryptography.X509Certificates.X509Certificate2CollectionTest.Export_Multiple_Pfx
# data
# Expected: not null
# But was: null
MonoTests.System.Security.Cryptography.X509Certificates.X509Certificate2CollectionTest.Export_Empty_SerializedStore
# data
# Expected: not null
# But was: null
MonoTests.System.Security.Cryptography.X509Certificates.X509Certificate2CollectionTest.Export_Empty_Pkcs7
# data
# Expected: not null
# But was: null
MonoTests.System.Security.Cryptography.X509Certificates.X509Certificate2CollectionTest.Export_Empty_Pkcs12
# data
# Expected: not null
# But was: null
MonoTests.System.Security.Cryptography.X509Certificates.X509Certificate2CollectionTest.Export_Empty_Pfx
# System.NotSupportedException : Specified method is not supported.
MonoTests.System.Security.Cryptography.X509Certificates.X509Cert20Test.Export_SerializedCert
MonoTests.System.Security.Cryptography.X509Certificates.X509Cert20Test.Export_Pfx
MonoTests.System.Security.Cryptography.X509Certificates.X509Cert20Test.Export_Pkcs12
# Expected: True
# But was: False
MonoTests.System.Net.WebSockets.ClientWebSocketTest.ServerHandshakeReturnWrongUpgradeHeader
MonoTests.System.Net.WebSockets.ClientWebSocketTest.ServerHandshakeReturnWrongConnectionHeader
MonoTests.System.Net.WebSockets.ClientWebSocketTest.ServerHandshakeReturnCrapStatusCodeTest
# Expected: UnknownError
# But was: NameResolutionFailure
MonoTests.System.Net.WebRequestTest.TestFailedResolution
# Expected: ConnectFailure
# But was: UnknownError
MonoTests.System.Net.WebRequestTest.TestFailedConnection
# System.AggregateException : One or more errors occurred. (maximum number of service points reached)
# ----> System.Net.WebException : maximum number of service points reached
# ----> System.InvalidOperationException : maximum number of service points reached
MonoTests.System.Net.WebClientTestAsync.DownloadMultiple3
# System.AggregateException : One or more errors occurred. (maximum number of service points reached)
# ----> System.Net.WebException : maximum number of service points reached
# ----> System.InvalidOperationException : maximum number of service points reached
MonoTests.System.Net.WebClientTestAsync.DownloadMultiple2
# Expected: True
# But was: False
MonoTests.System.Net.WebClientTestAsync.DownloadMultiple
MonoTests.System.Net.WebClientTestAsync.DownloadFileTaskAsync
MonoTests.System.Net.WebClientTestAsync.Cancellation
# First assertion fails
MonoTests.System.Net.HttpRequestStreamTest.Write_Stream_Closed

Просмотреть файл

@ -1,3 +0,0 @@
# System.NotImplementedException : DTC unsupported, only SinglePhase commit supported for durable resource managers.
MonoTests.System.Transactions.EnlistTest.Vol0_Dur1_2PC
MonoTests.System.Transactions.EnlistTest.Vol0_Dur2

Просмотреть файл

@ -34,6 +34,7 @@ namespace Xamarin.iOS.UnitTests
public abstract string WriteResultsToFile ();
public abstract void WriteResultsToFile (TextWriter writer);
public abstract void SkipTests (IEnumerable<string> tests);
public abstract void SkipCategories (IEnumerable<string> categories);
protected void OnError (string message)
{

Просмотреть файл

@ -271,11 +271,42 @@ namespace Xamarin.iOS.UnitTests.NUnit
resultsXml.WriteResultFile (results, writer);
}
void AppendFilter (ITestFilter filter)
{
if (filter == null)
throw new ArgumentNullException (nameof (filter));
if (Filter.IsEmpty) {
Filter = filter;
} else {
AndFilter andFilter;
if (Filter is AndFilter) {
// add a new filter
andFilter = Filter as AndFilter;
andFilter.Add (filter);
} else {
andFilter = new AndFilter (Filter);
andFilter.Add (filter);
}
Filter = andFilter;
}
}
public override void SkipTests (IEnumerable<string> tests)
{
// grab the tests and create a filter for them
if (tests.Any ()) {
Filter = new TestMethodFilter (tests);
AppendFilter (new TestMethodFilter (tests));
}
}
public override void SkipCategories (IEnumerable<string> categories)
{
if (categories.Any ()) {
// build a category expression and trust the nunit lib
var expression = categories.Aggregate (
(current, next) => current + "," + next);
var categoriesFilter = new NotFilter (new CategoryExpression (expression).Filter);
AppendFilter (categoriesFilter);
}
}
}

Просмотреть файл

@ -73,6 +73,12 @@ namespace Xamarin.iOS.UnitTests.XUnit
messageSink.Execution.TestStartingEvent += (MessageHandlerArgs<ITestStarting> args) => HandleEvent ("TestStartingEvent", args, HandleTestStarting);
}
public void AddFilter (XUnitFilter filter)
{
if (filter != null) {
filters.Add (filter);
}
}
public void SetFilters (List<XUnitFilter> newFilters)
{
if (newFilters == null) {
@ -1015,5 +1021,14 @@ namespace Xamarin.iOS.UnitTests.XUnit
}
}
}
public override void SkipCategories (IEnumerable<string> categories)
{
if (categories.Any ()) {
foreach (var c in categories) {
filters.Add (XUnitFilter.CreateTraitFilter ("category", c, true));
}
}
}
}
}

Просмотреть файл

@ -13,6 +13,7 @@ using System.IO;
using System.Threading.Tasks;
using System.Linq;
using Foundation;
using NUnit.Framework.Internal.Filters;
namespace BCLTests {
public partial class ViewController : UIViewController {
@ -74,12 +75,36 @@ namespace BCLTests {
var logger = (writer == null || options.EnableXml) ? new LogWriter () : new LogWriter (writer);
logger.MinimumLogLevel = MinimumLogLevel.Info;
var testAssemblies = GetTestAssemblies ();
Xamarin.iOS.UnitTests.TestRunner runner;
if (RegisterType.IsXUnit)
runner = new XUnitTestRunner (logger);
else
runner = new NUnitTestRunner (logger);
var runner = RegisterType.IsXUnit ? (Xamarin.iOS.UnitTests.TestRunner) new XUnitTestRunner (logger) : new NUnitTestRunner (logger);
var categories = RegisterType.IsXUnit ?
new List<string> {
"failing",
"nonmonotests",
"outerloop",
"nonosxtests"
} :
new List<string> {
"MobileNotWorking",
"NotOnMac",
"NotWorking",
"ValueAdd",
"CAS",
"InetAccess",
"NotWorkingLinqInterpreter",
};
if (RegisterType.IsXUnit) {
// special case when we are using the xunit runner,
// there is a trait we are not interested in which is
// the Benchmark one
var xunitRunner = runner as XUnitTestRunner;
xunitRunner.AddFilter (XUnitFilter.CreateTraitFilter ("Benchmark", "true", true));
}
// add category filters if they have been added
runner.SkipCategories (categories);
// if we have ignore files, ignore those tests
var skippedTests = await IgnoreFileParser.ParseContentFilesAsync (NSBundle.MainBundle.BundlePath);
if (skippedTests.Any ()) {
// ensure that we skip those tests that have been passed via the ignore files

Просмотреть файл

@ -17,6 +17,7 @@ using Xamarin.iOS.UnitTests.NUnit;
using BCLTests.TestRunner.Core;
using Xamarin.iOS.UnitTests.XUnit;
using System.IO;
using NUnit.Framework.Internal.Filters;
namespace Xamarin.Mac.Tests
{
@ -48,18 +49,42 @@ namespace Xamarin.Mac.Tests
var logger = new LogWriter (Console.Out);
logger.MinimumLogLevel = MinimumLogLevel.Info;
var testAssemblies = GetTestAssemblies ();
TestRunner runner;
if (RegisterType.IsXUnit)
runner = new XUnitTestRunner (logger);
else
runner = new NUnitTestRunner (logger);
runner.Run (testAssemblies.ToList ());
using (var writer = new StreamWriter(options.ResultFile)) {
runner.WriteResultsToFile (writer);
var runner = RegisterType.IsXUnit ? (TestRunner) new XUnitTestRunner (logger) : new NUnitTestRunner (logger);
var categories = RegisterType.IsXUnit ?
new List<string> {
"failing",
"nonmonotests",
"outerloop",
"nonosxtests"
} :
new List<string> {
"MacNotWorking",
"MobileNotWorking",
"NotOnMac",
"NotWorking",
"ValueAdd",
"CAS",
"InetAccess",
"NotWorkingLinqInterpreter"
};
if (RegisterType.IsXUnit) {
// special case when we are using the xunit runner,
// there is a trait we are not interested in which is
// the Benchmark one
var xunitRunner = runner as XUnitTestRunner;
xunitRunner.AddFilter (XUnitFilter.CreateTraitFilter ("Benchmark", "true", true));
}
runner.SkipCategories (categories);
runner.Run (testAssemblies.ToList ());
if (options.ResultFile != null) {
using (var writer = new StreamWriter (options.ResultFile)) {
runner.WriteResultsToFile (writer);
}
logger.Info ($"Xml result can be found {options.ResultFile}");
}
logger.Info ($"Xml result can be found {options.ResultFile}");
logger.Info ($"Tests run: {runner.TotalTests} Passed: {runner.PassedTests} Inconclusive: {runner.InconclusiveTests} Failed: {runner.FailedTests} Ignored: {runner.SkippedTests}");
return runner.FailedTests != 0 ? 1 : 0;

Просмотреть файл

@ -13,6 +13,7 @@ using Xamarin.iOS.UnitTests.XUnit;
using System.Threading.Tasks;
using System.IO;
using Foundation;
using NUnit.Framework.Internal.Filters;
namespace BCLTests {
public partial class ViewController : UIViewController {
@ -72,12 +73,36 @@ namespace BCLTests {
var logger = (writer == null || options.EnableXml) ? new LogWriter () : new LogWriter (writer);
logger.MinimumLogLevel = MinimumLogLevel.Info;
var testAssemblies = GetTestAssemblies ();
Xamarin.iOS.UnitTests.TestRunner runner;
if (RegisterType.IsXUnit)
runner = new XUnitTestRunner (logger);
else
runner = new NUnitTestRunner (logger);
var runner = RegisterType.IsXUnit ? (Xamarin.iOS.UnitTests.TestRunner) new XUnitTestRunner (logger) : new NUnitTestRunner (logger);
var categories = RegisterType.IsXUnit ?
new List<string> {
"failing",
"nonmonotests",
"outerloop",
"nonosxtests"
} :
new List<string> {
"MobileNotWorking",
"NotOnMac",
"NotWorking",
"ValueAdd",
"CAS",
"InetAccess",
"NotWorkingLinqInterpreter",
};
if (RegisterType.IsXUnit) {
// special case when we are using the xunit runner,
// there is a trait we are not interested in which is
// the Benchmark one
var xunitRunner = runner as XUnitTestRunner;
xunitRunner.AddFilter (XUnitFilter.CreateTraitFilter ("Benchmark", "true", true));
}
// add category filters if they have been added
runner.SkipCategories (categories);
// if we have ignore files, ignore those tests
var skippedTests = await IgnoreFileParser.ParseContentFilesAsync (NSBundle.MainBundle.BundlePath);
if (skippedTests.Any ()) {
// ensure that we skip those tests that have been passed via the ignore files

Просмотреть файл

@ -104,11 +104,35 @@ namespace monotouchtestWatchKitExtension
var logger = (writer == null || options.EnableXml) ? new LogWriter () : new LogWriter (writer);
logger.MinimumLogLevel = MinimumLogLevel.Info;
var testAssemblies = GetTestAssemblies ();
if (RegisterType.IsXUnit)
runner = new XUnitTestRunner (logger);
else
runner = new NUnitTestRunner (logger);
runner = RegisterType.IsXUnit ? (Xamarin.iOS.UnitTests.TestRunner) new XUnitTestRunner (logger) : new NUnitTestRunner (logger);
var categories = RegisterType.IsXUnit ?
new List<string> {
"failing",
"nonmonotests",
"outerloop",
"nonosxtests"
} :
new List<string> {
"MobileNotWorking",
"NotOnMac",
"NotWorking",
"ValueAdd",
"CAS",
"InetAccess",
"NotWorkingLinqInterpreter",
};
if (RegisterType.IsXUnit) {
// special case when we are using the xunit runner,
// there is a trait we are not interested in which is
// the Benchmark one
var xunitRunner = runner as XUnitTestRunner;
xunitRunner.AddFilter (XUnitFilter.CreateTraitFilter ("Benchmark", "true", true));
}
// add category filters if they have been added
runner.SkipCategories (categories);
// if we have ignore files, ignore those tests
var skippedTests = IgnoreFileParser.ParseContentFiles (NSBundle.MainBundle.BundlePath);
if (skippedTests.Any ()) {
// ensure that we skip those tests that have been passed via the ignore files

Просмотреть файл

@ -18,4 +18,5 @@ MonoTests.System.Net.Http.HttpClientTest.Send_Complete_CustomHeaders_SpecialSepa
MonoTests.System.Net.Http.HttpClientTest.Send_Complete_Error
MonoTests.System.Net.Http.HttpClientTest.Send_Content_BomEncoding
MonoTests.System.Net.Http.HttpClientTest.Send_Content_Get
MonoTests.System.Net.Http.HttpClientTest.Send_Content_Put
MonoTests.System.Net.Http.HttpClientTest.Send_Content_Put
MonoTests.System.Net.Http.HttpClientTest.Send_Complete_Content_MaxResponseContentBufferSize_Error

Просмотреть файл

@ -512,4 +512,13 @@ MonoCasTests.System.Net.Sockets.SocketCas.AsyncReceiveFrom
MonoCasTests.System.Net.Sockets.SocketCas.AsyncSend
MonoCasTests.System.Net.Sockets.SocketCas.AsyncSendTo
MonoCasTests.System.Net.Sockets.NetworkStreamCas.AsyncRead
MonoCasTests.System.Net.Sockets.NetworkStreamCas.AsyncWrite
MonoCasTests.System.Net.Sockets.NetworkStreamCas.AsyncWrite
# System.PlatformNotSupportedException : System.Net.Sockets.UdpClient is not supported on the current platform.
MonoTests.System.Net.Sockets.UdpClientTest.JoinMulticastGroup1_Socket_NotBound
MonoTests.System.Net.Sockets.UdpClientTest.JoinMulticastGroupWithLocal
# System.Net.HttpWebRequest is not supported on the current platform.
MonoTests.System.Net.WebRequestTest.TestFailedConnection
MonoTests.System.Net.WebRequestTest.TestFailedResolution
MonoTests.System.Net.WebRequestTest.TestReceiveCancelation

Просмотреть файл

@ -561,6 +561,31 @@ namespace GeneratorTests
Assert.AreEqual (modelName, attrib.ConstructorArguments [0].Value, "Custom ObjC name");
}
[Test]
public void GHIssue5444 () => BuildFile (Profile.iOS, "ghissue5444.cs");
[Test]
public void GH5416_method ()
{
var bgen = new BGenTool ();
bgen.Profile = Profile.iOS;
bgen.AddTestApiDefinition ("ghissue5416b.cs");
bgen.CreateTemporaryBinding ();
bgen.AssertExecute ("build");
bgen.AssertWarning (1118, "[NullAllowed] should not be used on methods, like 'NSString Method(Foundation.NSDate, Foundation.NSObject)', but only on properties, parameters and return values.");
}
[Test]
public void GH5416_setter ()
{
var bgen = new BGenTool ();
bgen.Profile = Profile.iOS;
bgen.AddTestApiDefinition ("ghissue5416a.cs");
bgen.CreateTemporaryBinding ();
bgen.AssertExecute ("build");
bgen.AssertWarning (1118, "[NullAllowed] should not be used on methods, like 'Void set_Setter(Foundation.NSString)', but only on properties, parameters and return values.");
}
BGenTool BuildFile (Profile profile, params string [] filenames)
{
return BuildFile (profile, true, false, filenames);

Просмотреть файл

@ -0,0 +1,11 @@
using Foundation;
using ObjCRuntime;
namespace GHIssue5416 {
[BaseType (typeof (NSObject))]
interface NullAllowedWarning {
[Export ("setter", ArgumentSemantic.Assign)]
NSString Setter { get; [NullAllowed] set; }
}
}

Просмотреть файл

@ -0,0 +1,12 @@
using Foundation;
using ObjCRuntime;
namespace GHIssue5416 {
[BaseType (typeof (NSObject))]
interface NullAllowedWarning {
[Export ("methodWhen:data:", ArgumentSemantic.Assign)]
[NullAllowed]
NSString Method (NSDate d, NSObject o);
}
}

Просмотреть файл

@ -0,0 +1,19 @@
using Foundation;
using ObjCRuntime;
namespace GHIssue5444 {
[BaseType (typeof (NSObject))]
interface CardScheme {
[Export ("colorScheme", ArgumentSemantic.Assign)]
new NSString ColorScheme { get; set; }
[Export ("shapeScheme", ArgumentSemantic.Assign)]
new NSString ShapeScheme { get; set; }
NSString SemanticColorScheme {
[Wrap ("Runtime.GetNSObject<NSString> (ColorScheme.Handle, false)")] get;
[Wrap ("ColorScheme = value")] set;
}
}
}

Просмотреть файл

@ -14,9 +14,11 @@ using System.Threading;
#if XAMCORE_2_0
using Foundation;
using CoreFoundation;
using ObjCRuntime;
#else
using MonoTouch.CoreFoundation;
using MonoTouch.Foundation;
using MonoTouch.ObjCRuntime;
#endif
using NUnit.Framework;
@ -27,6 +29,13 @@ namespace MonoTouchFixtures.CoreFoundation
[Preserve (AllMembers = true)]
public class DispatchBlockTest
{
[SetUp]
public void SetUp ()
{
TestRuntime.AssertSystemVersion (PlatformName.iOS, 8, 0, throwIfOtherPlatform: false);
TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 10, 10, throwIfOtherPlatform: false);
}
[Test]
public void Invoke ()
{
@ -90,6 +99,8 @@ namespace MonoTouchFixtures.CoreFoundation
[Test]
public void Wait_DispatchTime ()
{
TestRuntime.AssertXcodeVersion (8, 0);
var called = false;
var callback = new Action (() => called = true);
using (var db = new DispatchBlock (callback)) {
@ -109,6 +120,8 @@ namespace MonoTouchFixtures.CoreFoundation
[Test]
public void Wait_TimeSpan ()
{
TestRuntime.AssertXcodeVersion (8, 0);
var called = false;
var callback = new Action (() => called = true);
using (var db = new DispatchBlock (callback)) {
@ -142,6 +155,8 @@ namespace MonoTouchFixtures.CoreFoundation
[Test]
public void Constructors ()
{
TestRuntime.AssertXcodeVersion (8, 0);
var called = false;
var callback = new Action (() => called = true);
DispatchBlockFlags flags;
@ -220,6 +235,8 @@ namespace MonoTouchFixtures.CoreFoundation
[Test]
public void Create ()
{
TestRuntime.AssertXcodeVersion (8, 0);
var called = false;
var callback = new Action (() => called = true);
DispatchBlockFlags flags;

Просмотреть файл

@ -14,9 +14,11 @@ using System.Threading;
#if XAMCORE_2_0
using Foundation;
using CoreFoundation;
using ObjCRuntime;
#else
using MonoTouch.CoreFoundation;
using MonoTouch.Foundation;
using MonoTouch.ObjCRuntime;
#endif
using NUnit.Framework;
@ -55,6 +57,9 @@ namespace MonoTouchFixtures.CoreFoundation {
[Test]
public void NotifyWithDispatchBlock ()
{
TestRuntime.AssertSystemVersion (PlatformName.iOS, 8, 0, throwIfOtherPlatform: false);
TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 10, 10, throwIfOtherPlatform: false);
using (var dg = new DispatchGroup ()) {
var called = false;
var callback = new Action (() => called = true);

Просмотреть файл

@ -105,6 +105,9 @@ namespace MonoTouchFixtures.CoreFoundation
[Test]
public void DispatchSync ()
{
TestRuntime.AssertSystemVersion (PlatformName.iOS, 8, 0, throwIfOtherPlatform: false);
TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 10, 10, throwIfOtherPlatform: false);
using (var queue = new DispatchQueue ("DispatchSync")) {
var called = false;
var callback = new Action (() => called = true);
@ -121,6 +124,9 @@ namespace MonoTouchFixtures.CoreFoundation
[Test]
public void DispatchBarrierSync ()
{
TestRuntime.AssertSystemVersion (PlatformName.iOS, 8, 0, throwIfOtherPlatform: false);
TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 10, 10, throwIfOtherPlatform: false);
using (var queue = new DispatchQueue ("DispatchBarrierSync")) {
var called = false;
var callback = new Action (() => called = true);
@ -137,6 +143,9 @@ namespace MonoTouchFixtures.CoreFoundation
[Test]
public void DispatchAsync ()
{
TestRuntime.AssertSystemVersion (PlatformName.iOS, 8, 0, throwIfOtherPlatform: false);
TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 10, 10, throwIfOtherPlatform: false);
using (var queue = new DispatchQueue ("DispatchAsync")) {
var called = false;
var callback = new Action (() => called = true);
@ -156,6 +165,9 @@ namespace MonoTouchFixtures.CoreFoundation
[Test]
public void DispatchBarrierAsync ()
{
TestRuntime.AssertSystemVersion (PlatformName.iOS, 8, 0, throwIfOtherPlatform: false);
TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 10, 10, throwIfOtherPlatform: false);
using (var queue = new DispatchQueue ("DispatchBarrierAsync")) {
var called = false;
var callback = new Action (() => called = true);

Просмотреть файл

@ -40,6 +40,7 @@ namespace MonoTouchFixtures.UIKit {
}
[Test]
[Ignore ("Issue: https://github.com/xamarin/maccore/issues/1345 && WIP PR: https://github.com/xamarin/xamarin-macios/pull/5462")]
public void NoStrongCycles ()
{
bool finalizedAnyCtor = false;

2
tests/mtouch/.gitignore поставляемый
Просмотреть файл

@ -3,3 +3,5 @@ TestResult.xml
index.html
.failed-stamp
test.config
*.csproj.inc

Просмотреть файл

@ -3968,6 +3968,38 @@ public partial class KeyboardViewController : UIKit.UIInputViewController
}
}
[Test]
public void RebuildWhenReferenceSymbolsInCode ()
{
using (var mtouch = new MTouchTool ()) {
var bindingsLibrary = GetBindingsLibrary (Profile.iOS);
mtouch.References = new string [] { bindingsLibrary };
mtouch.CreateTemporaryApp_LinkWith ();
mtouch.CreateTemporaryCacheDirectory ();
mtouch.SymbolMode = MTouchSymbolMode.Code;
mtouch.Verbosity = 9;
// first build
mtouch.AssertExecute (MTouchAction.BuildSim, "build");
// first rebuild, no changes
mtouch.AssertExecute (MTouchAction.BuildSim, "build");
var output = mtouch.Output.ToString ();
Assert.That (output, Does.Not.Contain ("must be rebuilt"), "nothing rebuilt in first rebuild");
Assert.That (output, Does.Not.Contain ("clang"), "no clang in first rebuild");
// second build, touch an assembly
new FileInfo (bindingsLibrary).LastWriteTimeUtc = DateTime.UtcNow;
mtouch.AssertExecute (MTouchAction.BuildSim, "build");
output = mtouch.Output.ToString ();
Assert.That (output, Does.Contain ("Reloading cached assemblies."), "reloaded cached assemblies");
// we touched the binding assembly, which means mtouch re-extracted the .a from the binding library,
// which causes clang to execute for the main executable. This is good in this particular case, because
// re-executing clang successfully means we got the clang command line right.
Assert.That (output, Does.Contain ("clang"), "clang in second rebuild");
}
}
public void XamarinSdkAdjustLibs ()
{
using (var exttool = new MTouchTool ()) {

Просмотреть файл

@ -19,20 +19,27 @@ all-local::
# or multiple tests:
# make run-tests TEST_FIXTURE="-test=Xamarin.MTouch.MT1016,Xamarin.MTouch.MT1017"
run-tests: test.config
run-tests: bin/Debug/mtouch.dll test.config
rm -f .failed-stamp
$(SYSTEM_MONO) --debug $(TOP)/packages/NUnit.ConsoleRunner.3.5.0/tools/nunit3-console.exe $(abspath $(TOP)/tests/mtouch/bin/Debug/mtouch.dll) "--result=$(abspath $(CURDIR)/TestResult.xml);format=nunit2" $(TEST_FIXTURE) --labels=All --inprocess || touch $(CURDIR)/.failed-stamp
$(SYSTEM_MONO) --debug $(TOP)/packages/NUnit.ConsoleRunner.3.5.0/tools/nunit3-console.exe "$(abspath $<)" "--result=$(abspath $(CURDIR)/TestResult.xml);format=nunit2" $(TEST_FIXTURE) --labels=All --inprocess || touch $(CURDIR)/.failed-stamp
@# Create an html file and tell MonkeyWrench to upload it (if we're running there)
@[[ -z "$$BUILD_REPOSITORY" ]] || \
( xsltproc $(TOP)/tests/HtmlTransform.xslt TestResult.xml > index.html && \
echo "@MonkeyWrench: AddFile: $$PWD/index.html")
@[[ ! -e .failed-stamp ]]
build:
# mtouch.csproj.inc contains the mtouch_dependencies variable used to determine if mtouch.dll needs to be rebuilt or not.
mtouch.csproj.inc: $(TOP)/tools/common/create-makefile-fragment.sh Makefile
$(Q_GEN) $< $(CURDIR)/mtouch.csproj
-include mtouch.csproj.inc
bin/Debug/mtouch.dll: $(mtouch_dependencies)
$(Q) $(SYSTEM_MONO) /Library/Frameworks//Mono.framework/Versions/Current/lib/mono/nuget/NuGet.exe restore packages.config
$(SYSTEM_XIBUILD) -- mtouch.csproj $(XBUILD_VERBOSITY)
$(Q) rm -f .failed-stamp
build: bin/Debug/mtouch.dll
test.config: $(TOP)/Make.config Makefile
@rm -f $@
@echo "MONOTOUCH_PREFIX=$(MONOTOUCH_PREFIX)" >> $@

Просмотреть файл

@ -174,7 +174,6 @@
!missing-field! kCMTextMarkupAlignmentType_Right not bound
!missing-field! kCMTextMarkupAlignmentType_Start not bound
!missing-field! kCMTextMarkupAttribute_Alignment not bound
!missing-field! kCMTextMarkupAttribute_BaseFontSizePercentageRelativeToVideoHeight not bound
!missing-field! kCMTextMarkupAttribute_CharacterBackgroundColorARGB not bound
!missing-field! kCMTextMarkupAttribute_CharacterEdgeStyle not bound
!missing-field! kCMTextMarkupAttribute_GenericFontFamilyName not bound

Просмотреть файл

@ -87,7 +87,7 @@ namespace BCLTestImporter {
(name:"SystemXmlTests", assemblies: new [] {"monotouch_System.Xml_test.dll"}),
(name:"SystemXmlLinqTests", assemblies: new [] {"monotouch_System.Xml.Linq_test.dll"}),
(name:"MonoSecurityTests", assemblies: new [] {"monotouch_Mono.Security_test.dll"}),
(name:"SystemComponentModelDataAnnotationTests", assemblies: new [] {"monotouch_System.ComponentModel.DataAnnotations_test.dll"}),
(name:"SystemComponentModelDataAnnotationsTests", assemblies: new [] {"monotouch_System.ComponentModel.DataAnnotations_test.dll"}),
(name:"SystemJsonTests", assemblies: new [] {"monotouch_System.Json_test.dll"}),
(name:"SystemServiceModelWebTests", assemblies: new [] {"monotouch_System.ServiceModel.Web_test.dll"}),
(name:"MonoDataTdsTests", assemblies: new [] {"monotouch_Mono.Data.Tds_test.dll"}),
@ -109,7 +109,6 @@ namespace BCLTestImporter {
};
static readonly List <string> CommonIgnoredAssemblies = new List <string> {
"monotouch_System.Security_test.dll", // issue https://github.com/xamarin/maccore/issues/1139
"monotouch_Commons.Xml.Relaxng_test.dll", // not supported by xamarin
"monotouch_Cscompmgd_test.dll", // not supported by xamarin
"monotouch_I18N.CJK_test.dll",

Просмотреть файл

@ -27,19 +27,27 @@ namespace Xamarin.Bundler
public SymbolType Type;
public bool Ignore;
static string ObjectiveCPrefix {
get {
return Driver.SupportsModernObjectiveC ? "OBJC_CLASS_$_" : ".objc_class_name_";
}
}
string name;
public string Name {
get {
if (name != null)
return name;
if (ObjectiveCName != null) {
var prefix = Driver.SupportsModernObjectiveC ? "OBJC_CLASS_$_" : ".objc_class_name_";
return prefix + ObjectiveCName;
}
if (ObjectiveCName != null)
return ObjectiveCPrefix + ObjectiveCName;
throw ErrorHelper.CreateError (99, $"Internal error: symbol without a name (type: {Type}). Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
}
set {
name = value;
if (name.StartsWith (ObjectiveCPrefix, StringComparison.Ordinal)) {
ObjectiveCName = name.Substring (ObjectiveCPrefix.Length);
name = null;
}
}
}
public string ObjectiveCName;

Просмотреть файл

@ -16,6 +16,16 @@ if df -t apfs / >/dev/null 2>&1; then
CP="cp -c"
fi
function report_error_line ()
{
echo "$@"
if test -n "$FAILURE_FILE"; then
# remove color codes when writing to failure file
# shellcheck disable=SC2001
echo "$@" | sed $'s,\x1b\\[[0-9;]*[a-zA-Z],,g' >> "$FAILURE_FILE"
fi
}
function show_help ()
{
echo "$(basename "$0"): Compare the managed API and generate a diff for the generated code between the currently built assemblies and a specific hash."
@ -30,6 +40,7 @@ function show_help ()
}
ORIGINAL_ARGS=("$@")
FAILURE_FILE=
while ! test -z "$1"; do
case "$1" in
--help|-\?|-h)
@ -56,15 +67,23 @@ while ! test -z "$1"; do
WORKING_DIR="${1#*=}"
shift
;;
--failure-file=*)
FAILURE_FILE="${1#*=}"
shift
;;
--failure-file)
FAILURE_FILE="$2"
shift 2
;;
*)
echo "Unknown argument: $1"
echo "Error: Unknown argument: $1"
exit 1
;;
esac
done
if test -z "$BASE_HASH"; then
echo "${RED}It's required to specify the hash to compare against (--base=HASH).${CLEAR}"
report_error_line "${RED}Error: It's required to specify the hash to compare against (--base=HASH).${CLEAR}"
exit 1
fi
@ -93,8 +112,8 @@ if test -z "$BUILD_REVISION"; then
fi
if [ -n "$(git status --porcelain --ignore-submodule)" ]; then
echo "${RED}Working directory isn't clean:${CLEAR}"
git $GIT_COLOR_P status --ignore-submodule | sed 's/^/ /'
report_error_line "${RED}** Error: Working directory isn't clean:${CLEAR}"
git $GIT_COLOR_P status --ignore-submodule | sed 's/^/ /' | while read line; do report_error_line "$line"; done
exit 1
fi
@ -174,7 +193,11 @@ git checkout --quiet --force --detach "$BASE_HASH"
touch "$OUTPUT_DIR/stamp"
echo "${BLUE}Building src/...${CLEAR}"
make -C "$ROOT_DIR/src" BUILD_DIR=../tools/comparison/build PROJECT_DIR="$OUTPUT_DIR/project-files" "IOS_DESTDIR=$OUTPUT_DIR/_ios-build" "MAC_DESTDIR=$OUTPUT_DIR/_mac-build" -j8
if ! make -C "$ROOT_DIR/src" BUILD_DIR=../tools/comparison/build PROJECT_DIR="$OUTPUT_DIR/project-files" "IOS_DESTDIR=$OUTPUT_DIR/_ios-build" "MAC_DESTDIR=$OUTPUT_DIR/_mac-build" -j8; then
EC=$?
report_error_line "${RED}Failed to build src/${CLEAR}"
exit "$EC"
fi
#
# API diff
@ -182,12 +205,20 @@ make -C "$ROOT_DIR/src" BUILD_DIR=../tools/comparison/build PROJECT_DIR="$OUTPUT
# Calculate apidiff references according to the temporary build
echo "${BLUE}Updating apidiff references...${CLEAR}"
make update-refs -C "$ROOT_DIR/tools/apidiff" -j8 APIDIFF_DIR="$OUTPUT_DIR/apidiff" IOS_DESTDIR="$OUTPUT_DIR/_ios-build" MAC_DESTDIR="$OUTPUT_DIR/_mac-build"
if ! make update-refs -C "$ROOT_DIR/tools/apidiff" -j8 APIDIFF_DIR="$OUTPUT_DIR/apidiff" IOS_DESTDIR="$OUTPUT_DIR/_ios-build" MAC_DESTDIR="$OUTPUT_DIR/_mac-build"; then
EC=$?
report_error_line "${RED}Failed to update apidiff references${CLEAR}"
exit "$EC"
fi
# Now compare the current build against those references
echo "${BLUE}Running apidiff...${CLEAR}"
APIDIFF_FILE=$OUTPUT_DIR/apidiff/api-diff.html
make all-local -C "$ROOT_DIR/tools/apidiff" -j8 APIDIFF_DIR="$OUTPUT_DIR/apidiff"
if ! make all-local -C "$ROOT_DIR/tools/apidiff" -j8 APIDIFF_DIR="$OUTPUT_DIR/apidiff"; then
EC=$?
report_error_line "${RED}Failed to run apidiff${CLEAR}"
exit "$EC"
fi
#
# Generator diff
@ -216,7 +247,7 @@ MODIFIED_FILES=$(find \
if test -n "$MODIFIED_FILES"; then
# If this list files, it means something's wrong with the build process
# (the logic to build/work in a different directory is incomplete/broken)
echo "${RED}The following files were modified, and they shouldn't have been:${CLEAR}"
echo "$MODIFIED_FILES" | sed 's/^/ /'
report_error_line "${RED}** Error: The following files were modified, and they shouldn't have been:${CLEAR}"
echo "$MODIFIED_FILES" | sed 's/^/ /' | while read line; do report_error_line "$line"; done
exit 1
fi