Skip to content

Commit 700e2c7

Browse files
committed
chore: move FdoUi and Generic follow-ups out of render PR
1 parent fbdc4d2 commit 700e2c7

4 files changed

Lines changed: 5 additions & 42 deletions

File tree

Src/FdoUi/FdoUiTests/FdoUiTests.cs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,10 @@
66
// Responsibility: TE Team
77
// ---------------------------------------------------------------------------------------------
88

9-
using System;
109
using NUnit.Framework;
11-
using SIL.FieldWorks.Common.FwUtils;
1210
using SIL.LCModel.Core.Text;
1311
using SIL.LCModel;
1412
using SIL.LCModel.DomainServices;
15-
using XCore;
1613

1714
namespace SIL.FieldWorks.FdoUi
1815
{
@@ -144,33 +141,5 @@ public void DeleteCmPictureObject_RelatedCleanUpDoesNotNegateDeletion()
144141
Assert.That(obj.IsValidObject, Is.False);
145142
}
146143
}
147-
148-
[Test]
149-
public void DeleteUnderlyingObject_PublishesDeleteRecordForCurrentObject()
150-
{
151-
var obj = Cache.ServiceLocator.GetInstance<ICmPictureFactory>().Create();
152-
using (var propertyTable = new PropertyTable(null))
153-
using (DummyCmObjectUi objectUi = DummyCmObjectUi.MakeDummyUi(obj))
154-
{
155-
propertyTable.SetProperty("ActiveClerkSelectedObject", obj, false);
156-
objectUi.PropTable = propertyTable;
157-
158-
object published = null;
159-
Action<object> deleteRecordHandler = data => published = data;
160-
try
161-
{
162-
FwUtils.Subscriber.Subscribe(EventConstants.DeleteRecord, deleteRecordHandler);
163-
164-
objectUi.DeleteUnderlyingObject();
165-
166-
Assert.That(published, Is.SameAs(objectUi));
167-
Assert.That(obj.IsValidObject, Is.True);
168-
}
169-
finally
170-
{
171-
FwUtils.Subscriber.Unsubscribe(EventConstants.DeleteRecord, deleteRecordHandler);
172-
}
173-
}
174-
}
175144
}
176145
}

Src/Generic/GenSmartPtr.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,8 @@ class _Lock_GenRefObj
9292
}
9393
};
9494

95-
#define GENSMARTPTR_CONCAT_INNER(a, b) a##b
96-
#define GENSMARTPTR_CONCAT(a, b) GENSMARTPTR_CONCAT_INNER(a, b)
97-
#define GenLockThis() _Lock_GenRefObj GENSMARTPTR_CONCAT(_lock_this_, __LINE__)(this)
98-
#define GenLockObj(pobj) _Lock_GenRefObj GENSMARTPTR_CONCAT(_lock_obj_, __LINE__)(pobj)
95+
#define GenLockThis() _Lock_GenRefObj _lock_this_##__LINE__(this)
96+
#define GenLockObj(pobj) _Lock_GenRefObj _lock_obj_##__LINE__(pobj)
9997

10098

10199

Src/Generic/UtilCom.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,10 +351,8 @@ class _Lock_Unknown
351351
}
352352
};
353353

354-
#define UTILCOM_CONCAT_INNER(a, b) a##b
355-
#define UTILCOM_CONCAT(a, b) UTILCOM_CONCAT_INNER(a, b)
356-
#define LockThis() _Lock_Unknown UTILCOM_CONCAT(_lock_this_, __LINE__)(this)
357-
#define LockObj(pobj) _Lock_Unknown UTILCOM_CONCAT(_lock_obj_, __LINE__)(pobj)
354+
#define LockThis() _Lock_Unknown _lock_this_##__LINE__(this)
355+
#define LockObj(pobj) _Lock_Unknown _lock_obj_##__LINE__(pobj)
358356

359357
/*************************************************************************************
360358
Miscellaneous COM related utility functions.

Src/Generic/UtilTime.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,7 @@ At some convenient point set m_msMyMethod to zero, and later see what it contain
468468
You can also surround a smaller piece of code with braces and call this at the start.
469469
Hungarian: not needed
470470
----------------------------------------------------------------------------------------------*/
471-
#define UTILTIME_CONCAT_INNER(a, b) a##b
472-
#define UTILTIME_CONCAT(a, b) UTILTIME_CONCAT_INNER(a, b)
473-
#define MeasureDuration(arg) _MeasureDuration UTILTIME_CONCAT(_measure_duration_, __LINE__)(&arg)
471+
#define MeasureDuration(arg) _MeasureDuration _measure_duration_##__LINE__(&arg)
474472

475473
class _MeasureDuration
476474
{

0 commit comments

Comments
 (0)