Skip to content

Commit

Permalink
fixed spacing before directive
Browse files Browse the repository at this point in the history
  • Loading branch information
Husqvik committed Nov 19, 2023
1 parent 8e32b37 commit 4610874
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class MultipleFileGenerationContext : GenerationContext
using System.ComponentModel;
using System.Globalization;
using System.Runtime.Serialization;
#if!{GraphQlGenerator.PreprocessorDirectiveDisableNewtonsoftJson}
#if !{GraphQlGenerator.PreprocessorDirectiveDisableNewtonsoftJson}
using Newtonsoft.Json;
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Runtime.Serialization;
#if!GRAPHQL_GENERATOR_DISABLE_NEWTONSOFT_JSON
#if !GRAPHQL_GENERATOR_DISABLE_NEWTONSOFT_JSON
using Newtonsoft.Json;
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Runtime.Serialization;
#if!GRAPHQL_GENERATOR_DISABLE_NEWTONSOFT_JSON
#if !GRAPHQL_GENERATOR_DISABLE_NEWTONSOFT_JSON
using Newtonsoft.Json;
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Runtime.Serialization;
#if!GRAPHQL_GENERATOR_DISABLE_NEWTONSOFT_JSON
#if !GRAPHQL_GENERATOR_DISABLE_NEWTONSOFT_JSON
using Newtonsoft.Json;
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Runtime.Serialization;
#if!GRAPHQL_GENERATOR_DISABLE_NEWTONSOFT_JSON
#if !GRAPHQL_GENERATOR_DISABLE_NEWTONSOFT_JSON
using Newtonsoft.Json;
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Runtime.Serialization;
#if!GRAPHQL_GENERATOR_DISABLE_NEWTONSOFT_JSON
#if !GRAPHQL_GENERATOR_DISABLE_NEWTONSOFT_JSON
using Newtonsoft.Json;
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Runtime.Serialization;
#if!GRAPHQL_GENERATOR_DISABLE_NEWTONSOFT_JSON
#if !GRAPHQL_GENERATOR_DISABLE_NEWTONSOFT_JSON
using Newtonsoft.Json;
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Runtime.Serialization;
#if!GRAPHQL_GENERATOR_DISABLE_NEWTONSOFT_JSON
#if !GRAPHQL_GENERATOR_DISABLE_NEWTONSOFT_JSON
using Newtonsoft.Json;
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Runtime.Serialization;
#if!GRAPHQL_GENERATOR_DISABLE_NEWTONSOFT_JSON
#if !GRAPHQL_GENERATOR_DISABLE_NEWTONSOFT_JSON
using Newtonsoft.Json;
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void SourceGenerationWithOneClassPerFile()
result.GeneratedSources.Length.ShouldBe(70);
var fileSizes = result.GeneratedSources.Where(s => s.HintName != "BaseClasses.cs").Select(s => s.SourceText.ToString().ReplaceLineEndings().Length).ToArray();
fileSizes.ShouldBe(
[3549, 743, 577, 790, 1403, 484, 619, 925, 641, 658, 1504, 3109, 11683, 3741, 4951, 1480, 4166, 3841, 3926, 2898, 2652, 6103, 4391, 1699, 2622, 5017, 4796, 1729, 2601, 4550, 3903, 1718, 1213, 4293, 1938, 1681, 1920, 9663, 1923, 5902, 2052, 642, 1373, 4358, 1556, 2583, 852, 2372, 1891, 1397, 1764, 942, 2585, 702, 839, 937, 3167, 2097, 703, 933, 2926, 1742, 701, 683, 1233, 811, 724, 704, 6926]);
[3550, 744, 578, 791, 1404, 485, 620, 926, 642, 659, 1505, 3110, 11684, 3742, 4952, 1481, 4167, 3842, 3927, 2899, 2653, 6104, 4392, 1700, 2623, 5018, 4797, 1730, 2602, 4551, 3904, 1719, 1214, 4294, 1939, 1682, 1921, 9664, 1924, 5903, 2053, 643, 1374, 4359, 1557, 2584, 853, 2373, 1892, 1398, 1765, 943, 2586, 703, 840, 938, 3168, 2098, 704, 934, 2927, 1743, 702, 684, 1234, 812, 725, 705, 6927]);
}

private static string GetExpectedSourceText(string expectedResultsFile)
Expand Down
13 changes: 5 additions & 8 deletions test/GraphQlClientGenerator.Test/GraphQlGeneratorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,11 @@ public GraphQlGeneratorTest(ITestOutputHelper outputHelper)
_outputHelper = outputHelper;
}

private static readonly IReadOnlyList<int> ExpectedFileSizes =
new[]
{
446, 475, 1399, 1179, 978, 4291, 519, 569, 2132, 1942, 455, 1114, 1173, 1685, 1779, 756, 494, 1611, 498, 1438, 792, 491, 1469, 4152, 963, 762, 3703, 5073, 478, 1416, 566, 2230, 613, 2414, 1225, 7007, 447,
1250, 571, 676, 2838, 2587, 489, 1493, 461, 1312, 368, 6061, 594, 2250, 1957, 921, 7944, 879, 1530, 493, 1537, 4786, 17353, 807, 1626, 627, 2712, 10001, 972, 5274, 1101, 552, 3332, 7244, 434, 1436, 543, 501,
1549, 2001, 575, 2286, 531, 1844, 621, 2619, 767, 571, 2032, 581, 2203, 3655, 755, 3898, 588, 2198, 676, 537, 1860, 2969, 1072, 795, 4017, 5758, 898, 4540, 520, 1793, 423, 1380, 664, 751, 3597, 2913, 450,
1202, 480, 589, 559, 2013, 548, 1876, 2327, 559, 2254, 782, 853, 4477, 938, 530, 1867, 872, 4593, 584, 2116, 501, 1492, 489, 2694, 5109, 586, 2242, 558, 1985, 561, 1230, 3652, 1985
};
private static readonly IReadOnlyList<int> ExpectedFileSizes = [
447, 476, 1400, 1180, 979, 4292, 520, 570, 2133, 1943, 456, 1115, 1174, 1686, 1780, 757, 495, 1612, 499, 1439, 793, 492, 1470, 4153, 964, 763, 3704, 5074, 479, 1417, 567, 2231, 614, 2415, 1226, 7008, 448,
1251, 572, 677, 2839, 2588, 490, 1494, 462, 1313, 368, 6062, 595, 2251, 1958, 922, 7945, 880, 1531, 494, 1538, 4787, 17354, 808, 1627, 628, 2713, 10002, 973, 5275, 1102, 553, 3333, 7245, 435, 1437, 544, 502,
1550, 2002, 576, 2287, 532, 1845, 622, 2620, 768, 572, 2033, 582, 2204, 3656, 756, 3899, 589, 2199, 677, 538, 1861, 2970, 1073, 796, 4018, 5759, 899, 4541, 521, 1794, 424, 1381, 665, 752, 3598, 2914, 451,
1203, 481, 590, 560, 2014, 549, 1877, 2328, 560, 2255, 783, 854, 4478, 939, 531, 1868, 873, 4594, 585, 2117, 502, 1493, 490, 2695, 5110, 587, 2243, 559, 1986, 562, 1231, 3653, 1986];

[Theory]
[InlineData(false)]
Expand Down

0 comments on commit 4610874

Please sign in to comment.