System.Data.SQLite

Check-in [9f01777e96]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add test case for ticket [eafaece5c1].
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | tkt-eafaece5c1
Files: files | file ages | folders
SHA1: 9f01777e96e7f198522feff0ac4a79d656bde8fa
User & Date: mistachkin 2016-04-01 03:03:20.923
Context
2016-04-01
03:03
Add test case for ticket [eafaece5c1]. Closed-Leaf check-in: 9f01777e96 user: mistachkin tags: tkt-eafaece5c1
02:35
Add a row to the LINQ test database for ticket [eafaece5c1]. check-in: 47ec08ca31 user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to testlinq/Program.cs.
196
197
198
199
200
201
202


















203
204
205
206
207
208
209
#endif
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461
              case "round":
                  {
                      return RoundTest();
                  }
#endif


















              case "complexprimarykey":
                  {
                      return ComplexPrimaryKeyTest();
                  }
              default:
                  {
                      Console.WriteLine("unknown test \"{0}\"", arg);







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
#endif
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461
              case "round":
                  {
                      return RoundTest();
                  }
#endif
              case "guidcollation":
                  {
                      bool value = false;

                      if (args.Length > 1)
                      {
                          if (!bool.TryParse(args[1], out value))
                          {
                              Console.WriteLine(
                                  "cannot parse \"{0}\" as boolean",
                                  args[1]);

                              return 1;
                          }
                      }

                      return GuidCollation(value);
                  }
              case "complexprimarykey":
                  {
                      return ComplexPrimaryKeyTest();
                  }
              default:
                  {
                      Console.WriteLine("unknown test \"{0}\"", arg);
770
771
772
773
774
775
776

































777
778
779
780
781
782
783
          Environment.SetEnvironmentVariable(
              "AppendManifestToken_SQLiteProviderManifest",
              null);

          return 0;
      }
#endif


































      private static int ComplexPrimaryKeyTest()
      {
          using (northwindEFEntities db = new northwindEFEntities())
          {
              long orderId = 10248;
              long productId = 1;







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
          Environment.SetEnvironmentVariable(
              "AppendManifestToken_SQLiteProviderManifest",
              null);

          return 0;
      }
#endif

      private static int GuidCollation(bool binaryGuid)
      {
          Environment.SetEnvironmentVariable(
              "AppendManifestToken_SQLiteProviderManifest",
              String.Format(";BinaryGUID={0};", binaryGuid));

          using (northwindEFEntities db = new northwindEFEntities())
          {
              //
              // NOTE: Always results in NotSupportedException due
              //       to the use of the ToString method.
              //
              //var query = db.Suppliers.Where(
              //    u => u.ContactName.ToString() ==
              //        "5D7991DA-FB99-6CB9-6487-7493F7F62E09");
              //
              var query = db.Suppliers.Where(
                  u => u.ContactName.ToString() ==
                      "5D7991DA-FB99-6CB9-6487-7493F7F62E09");

              foreach (var o in query)
              {
                  Console.WriteLine(o.ContactName);
              }
          }

          Environment.SetEnvironmentVariable(
              "AppendManifestToken_SQLiteProviderManifest",
              null);

          return 0;
      }

      private static int ComplexPrimaryKeyTest()
      {
          using (northwindEFEntities db = new northwindEFEntities())
          {
              long orderId = 10248;
              long productId = 1;