Skip to content

Commit 0a42192

Browse files
committed
Fix tests
1 parent 65be685 commit 0a42192

6 files changed

Lines changed: 728 additions & 729 deletions

File tree

backend/FwLite/FwDataMiniLcmBridge/Api/FwDataMiniLcmApi.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -726,24 +726,22 @@ private ComplexFormComponent ToEntryReference(ILexEntry component, ILexEntry com
726726
return new ComplexFormComponent
727727
{
728728
ComponentEntryId = component.Guid,
729-
ComponentHeadword = component.LexEntryHeadwordOrUnknown(),
729+
ComponentHeadword = component.LexEntryHeadwordOrUnknown(applyMorphTokens: false), // match CRDT for now
730730
ComplexFormEntryId = complexEntry.Guid,
731-
ComplexFormHeadword = complexEntry.LexEntryHeadwordOrUnknown(),
731+
ComplexFormHeadword = complexEntry.LexEntryHeadwordOrUnknown(applyMorphTokens: false), // match CRDT for now
732732
Order = Order(component, complexEntry)
733733
};
734734
}
735735

736-
737-
738736
private ComplexFormComponent ToSenseReference(ILexSense componentSense, ILexEntry complexEntry)
739737
{
740738
return new ComplexFormComponent
741739
{
742740
ComponentEntryId = componentSense.Entry.Guid,
743741
ComponentSenseId = componentSense.Guid,
744-
ComponentHeadword = componentSense.Entry.LexEntryHeadwordOrUnknown(),
742+
ComponentHeadword = componentSense.Entry.LexEntryHeadwordOrUnknown(applyMorphTokens: false), // match CRDT for now
745743
ComplexFormEntryId = complexEntry.Guid,
746-
ComplexFormHeadword = complexEntry.LexEntryHeadwordOrUnknown(),
744+
ComplexFormHeadword = complexEntry.LexEntryHeadwordOrUnknown(applyMorphTokens: false), // match CRDT for now
747745
Order = Order(componentSense, complexEntry)
748746
};
749747
}

backend/FwLite/FwDataMiniLcmBridge/Api/LcmHelpers.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ internal static class LcmHelpers
3535
return (leading + lexemeForm + trailing).Trim(WhitespaceChars);
3636
}
3737

38-
internal static string LexEntryHeadwordOrUnknown(this ILexEntry entry, int? ws = null)
38+
internal static string LexEntryHeadwordOrUnknown(this ILexEntry entry, int? ws = null, bool applyMorphTokens = true)
3939
{
40-
var headword = entry.LexEntryHeadword(ws);
40+
var headword = entry.LexEntryHeadword(ws, applyMorphTokens);
4141
return string.IsNullOrEmpty(headword) ? Entry.UnknownHeadword : headword;
4242
}
4343

0 commit comments

Comments
 (0)