Skip to content

Commit

Permalink
Fix a warning and Unity build
Browse files Browse the repository at this point in the history
  • Loading branch information
nirinchev committed Aug 23, 2024
1 parent 0cf0dba commit 3cf2446
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Realm/Realm/Logging/Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

using System;
using System.Collections.Concurrent;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
Expand Down Expand Up @@ -49,6 +50,7 @@ protected override void LogImpl(LogLevel level, LogCategory category, string mes
/// A few built-in implementations are provided by <see cref="Console"/>, <see cref="Null"/>, and <see cref="Function(Action{string})"/>,
/// but you can implement your own.
/// </summary>
[SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:File may only contain a single type", Justification = "Original logger is deprecated")]
public abstract class RealmLogger
{
private readonly Lazy<GCHandle> _gcHandle;
Expand Down
5 changes: 3 additions & 2 deletions Tests/Realm.Tests/Sync/DataTypeSynchronizationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -902,14 +902,15 @@ public void NestedCollections_Merge()
var list2 = obj1.RealmValueProperty.AsDictionary()["list"].AsList();
var dictionary2 = obj1.RealmValueProperty.AsDictionary()["dictionary"].AsDictionary();
Assert.That(list1, Does.Not.Contain((RealmValue)1));
Assert.That(list1, Does.Not.Contains((RealmValue)1));
Assert.That(list1, Contains.Item((RealmValue)2));
Assert.That(list1, Contains.Item((RealmValue)3));
Assert.That(list1, Contains.Item((RealmValue)4));
Assert.That(list1, Contains.Item((RealmValue)5));
Assert.That(list1, Is.EqualTo(list2).Using(_rvComparer));
Assert.That(dictionary1, Does.Not.ContainKey("key1"));
// Unity Nunit doesn't support Does.Not.ContainKey, so use a more simplistic expression here
Assert.That(dictionary1.ContainsKey("key1"), Is.False);
Assert.That(dictionary1, Contains.Key("key2"));
Assert.That(dictionary1, Contains.Key("key3"));
Assert.That(dictionary1, Is.EqualTo(dictionary2).Using(_rvComparer));
Expand Down

0 comments on commit 3cf2446

Please sign in to comment.