@fluid-experimental/property-properties 2.0.0-internal.3.0.2 → 2.0.0-internal.3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/README.md +1 -0
  2. package/dist/containerSerializer.d.ts.map +1 -1
  3. package/dist/containerSerializer.js +5 -5
  4. package/dist/containerSerializer.js.map +1 -1
  5. package/dist/enableValidations.js.map +1 -1
  6. package/dist/index.d.ts +19 -19
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js.map +1 -1
  9. package/dist/properties/abstractStaticCollectionProperty.d.ts +10 -10
  10. package/dist/properties/abstractStaticCollectionProperty.d.ts.map +1 -1
  11. package/dist/properties/abstractStaticCollectionProperty.js +70 -53
  12. package/dist/properties/abstractStaticCollectionProperty.js.map +1 -1
  13. package/dist/properties/arrayProperty.d.ts.map +1 -1
  14. package/dist/properties/arrayProperty.js +152 -103
  15. package/dist/properties/arrayProperty.js.map +1 -1
  16. package/dist/properties/baseProperty.d.ts +4 -4
  17. package/dist/properties/baseProperty.d.ts.map +1 -1
  18. package/dist/properties/baseProperty.js +69 -47
  19. package/dist/properties/baseProperty.js.map +1 -1
  20. package/dist/properties/boolProperty.d.ts.map +1 -1
  21. package/dist/properties/boolProperty.js +3 -3
  22. package/dist/properties/boolProperty.js.map +1 -1
  23. package/dist/properties/containerProperty.d.ts +8 -8
  24. package/dist/properties/containerProperty.d.ts.map +1 -1
  25. package/dist/properties/containerProperty.js +33 -26
  26. package/dist/properties/containerProperty.js.map +1 -1
  27. package/dist/properties/enumArrayProperty.d.ts.map +1 -1
  28. package/dist/properties/enumArrayProperty.js +14 -14
  29. package/dist/properties/enumArrayProperty.js.map +1 -1
  30. package/dist/properties/enumProperty.d.ts.map +1 -1
  31. package/dist/properties/enumProperty.js +17 -17
  32. package/dist/properties/enumProperty.js.map +1 -1
  33. package/dist/properties/floatProperties.js +4 -4
  34. package/dist/properties/floatProperties.js.map +1 -1
  35. package/dist/properties/index.d.ts +23 -23
  36. package/dist/properties/index.d.ts.map +1 -1
  37. package/dist/properties/index.js.map +1 -1
  38. package/dist/properties/indexedCollectionBaseProperty.d.ts.map +1 -1
  39. package/dist/properties/indexedCollectionBaseProperty.js +47 -37
  40. package/dist/properties/indexedCollectionBaseProperty.js.map +1 -1
  41. package/dist/properties/intProperties.d.ts.map +1 -1
  42. package/dist/properties/intProperties.js +10 -10
  43. package/dist/properties/intProperties.js.map +1 -1
  44. package/dist/properties/lazyLoadedProperties.js.map +1 -1
  45. package/dist/properties/mapProperty.d.ts.map +1 -1
  46. package/dist/properties/mapProperty.js +21 -17
  47. package/dist/properties/mapProperty.js.map +1 -1
  48. package/dist/properties/namedNodeProperty.d.ts.map +1 -1
  49. package/dist/properties/namedNodeProperty.js +3 -3
  50. package/dist/properties/namedNodeProperty.js.map +1 -1
  51. package/dist/properties/namedProperty.d.ts.map +1 -1
  52. package/dist/properties/namedProperty.js +7 -5
  53. package/dist/properties/namedProperty.js.map +1 -1
  54. package/dist/properties/nodeProperty.d.ts.map +1 -1
  55. package/dist/properties/nodeProperty.js +5 -3
  56. package/dist/properties/nodeProperty.js.map +1 -1
  57. package/dist/properties/primitiveTypeCasts.d.ts.map +1 -1
  58. package/dist/properties/primitiveTypeCasts.js +9 -9
  59. package/dist/properties/primitiveTypeCasts.js.map +1 -1
  60. package/dist/properties/referenceArrayProperty.d.ts.map +1 -1
  61. package/dist/properties/referenceArrayProperty.js +31 -25
  62. package/dist/properties/referenceArrayProperty.js.map +1 -1
  63. package/dist/properties/referenceMapProperty.d.ts.map +1 -1
  64. package/dist/properties/referenceMapProperty.js +18 -18
  65. package/dist/properties/referenceMapProperty.js.map +1 -1
  66. package/dist/properties/referenceProperty.d.ts.map +1 -1
  67. package/dist/properties/referenceProperty.js +33 -29
  68. package/dist/properties/referenceProperty.js.map +1 -1
  69. package/dist/properties/setProperty.d.ts.map +1 -1
  70. package/dist/properties/setProperty.js +31 -29
  71. package/dist/properties/setProperty.js.map +1 -1
  72. package/dist/properties/stringProperty.d.ts.map +1 -1
  73. package/dist/properties/stringProperty.js +56 -40
  74. package/dist/properties/stringProperty.js.map +1 -1
  75. package/dist/properties/uintProperties.js +5 -5
  76. package/dist/properties/uintProperties.js.map +1 -1
  77. package/dist/properties/valueArrayProperty.d.ts +1 -1
  78. package/dist/properties/valueArrayProperty.d.ts.map +1 -1
  79. package/dist/properties/valueArrayProperty.js +30 -29
  80. package/dist/properties/valueArrayProperty.js.map +1 -1
  81. package/dist/properties/valueMapProperty.d.ts.map +1 -1
  82. package/dist/properties/valueMapProperty.js +31 -29
  83. package/dist/properties/valueMapProperty.js.map +1 -1
  84. package/dist/properties/valueProperty.d.ts.map +1 -1
  85. package/dist/properties/valueProperty.js +11 -9
  86. package/dist/properties/valueProperty.js.map +1 -1
  87. package/dist/propertyFactory.d.ts.map +1 -1
  88. package/dist/propertyFactory.js +309 -252
  89. package/dist/propertyFactory.js.map +1 -1
  90. package/dist/propertyTemplate.d.ts +17 -17
  91. package/dist/propertyTemplate.d.ts.map +1 -1
  92. package/dist/propertyTemplate.js +64 -45
  93. package/dist/propertyTemplate.js.map +1 -1
  94. package/dist/propertyTemplateWrapper.d.ts.map +1 -1
  95. package/dist/propertyTemplateWrapper.js +40 -25
  96. package/dist/propertyTemplateWrapper.js.map +1 -1
  97. package/dist/propertyUtils.d.ts.map +1 -1
  98. package/dist/propertyUtils.js.map +1 -1
  99. package/dist/test/properties/arrayProperty.spec.js +566 -490
  100. package/dist/test/properties/arrayProperty.spec.js.map +1 -1
  101. package/dist/test/properties/baseProperty.spec.js +293 -280
  102. package/dist/test/properties/baseProperty.spec.js.map +1 -1
  103. package/dist/test/properties/containerProperty.spec.js +100 -94
  104. package/dist/test/properties/containerProperty.spec.js.map +1 -1
  105. package/dist/test/properties/customArrayProperty.spec.js +174 -147
  106. package/dist/test/properties/customArrayProperty.spec.js.map +1 -1
  107. package/dist/test/properties/enumArrayProperty.spec.js +67 -63
  108. package/dist/test/properties/enumArrayProperty.spec.js.map +1 -1
  109. package/dist/test/properties/enumProperty.spec.js +115 -97
  110. package/dist/test/properties/enumProperty.spec.js.map +1 -1
  111. package/dist/test/properties/float32.spec.js +5 -5
  112. package/dist/test/properties/float32.spec.js.map +1 -1
  113. package/dist/test/properties/int64ArrayProperty.spec.js +157 -93
  114. package/dist/test/properties/int64ArrayProperty.spec.js.map +1 -1
  115. package/dist/test/properties/int64MapProperty.spec.js +185 -166
  116. package/dist/test/properties/int64MapProperty.spec.js.map +1 -1
  117. package/dist/test/properties/int64Property.spec.js +109 -109
  118. package/dist/test/properties/int64Property.spec.js.map +1 -1
  119. package/dist/test/properties/isLeafNode.spec.js +75 -76
  120. package/dist/test/properties/isLeafNode.spec.js.map +1 -1
  121. package/dist/test/properties/mapProperty.spec.js +571 -531
  122. package/dist/test/properties/mapProperty.spec.js.map +1 -1
  123. package/dist/test/properties/namedNodeProperty.spec.js +31 -31
  124. package/dist/test/properties/namedNodeProperty.spec.js.map +1 -1
  125. package/dist/test/properties/nodeProperty.spec.js +805 -795
  126. package/dist/test/properties/nodeProperty.spec.js.map +1 -1
  127. package/dist/test/properties/referenceProperty.spec.js +729 -679
  128. package/dist/test/properties/referenceProperty.spec.js.map +1 -1
  129. package/dist/test/properties/relationshipProperty.spec.js +16 -16
  130. package/dist/test/properties/relationshipProperty.spec.js.map +1 -1
  131. package/dist/test/properties/setProperty.spec.js +288 -227
  132. package/dist/test/properties/setProperty.spec.js.map +1 -1
  133. package/dist/test/properties/stringProperty.spec.js +326 -318
  134. package/dist/test/properties/stringProperty.spec.js.map +1 -1
  135. package/dist/test/properties/uint64Property.spec.js +46 -36
  136. package/dist/test/properties/uint64Property.spec.js.map +1 -1
  137. package/dist/test/properties/valueMapProperty.spec.js +259 -246
  138. package/dist/test/properties/valueMapProperty.spec.js.map +1 -1
  139. package/dist/test/properties/valueProperty.spec.js +49 -43
  140. package/dist/test/properties/valueProperty.spec.js.map +1 -1
  141. package/dist/test/propertyFactory.spec.js +2038 -1631
  142. package/dist/test/propertyFactory.spec.js.map +1 -1
  143. package/dist/test/propertyTemplateWrapper.spec.js +72 -102
  144. package/dist/test/propertyTemplateWrapper.spec.js.map +1 -1
  145. package/dist/test/propertyUtils.spec.js +22 -21
  146. package/dist/test/propertyUtils.spec.js.map +1 -1
  147. package/dist/test/reversibleChangeset.spec.js +857 -703
  148. package/dist/test/reversibleChangeset.spec.js.map +1 -1
  149. package/dist/test/setup.js +5 -5
  150. package/dist/test/setup.js.map +1 -1
  151. package/dist/test/tsconfig.tsbuildinfo +1 -1
  152. package/dist/test/utils.spec.js +1334 -1144
  153. package/dist/test/utils.spec.js.map +1 -1
  154. package/dist/test/validation/badMissingSemverInTypeid.js +20 -20
  155. package/dist/test/validation/badMissingSemverInTypeid.js.map +1 -1
  156. package/dist/test/validation/badPrimitiveTypeid.js +12 -12
  157. package/dist/test/validation/badPrimitiveTypeid.js.map +1 -1
  158. package/dist/test/validation/goodColorId.js +91 -91
  159. package/dist/test/validation/goodColorId.js.map +1 -1
  160. package/dist/test/validation/goodColorPalette.js +4 -4
  161. package/dist/test/validation/goodColorPalette.js.map +1 -1
  162. package/dist/test/validation/goodPointId.js +20 -20
  163. package/dist/test/validation/goodPointId.js.map +1 -1
  164. package/dist/test/validation/reversibleChangeSetTestData.js +23841 -2
  165. package/dist/test/validation/reversibleChangeSetTestData.js.map +1 -1
  166. package/lib/containerSerializer.d.ts.map +1 -1
  167. package/lib/containerSerializer.js +5 -5
  168. package/lib/containerSerializer.js.map +1 -1
  169. package/lib/enableValidations.js.map +1 -1
  170. package/lib/index.d.ts +19 -19
  171. package/lib/index.d.ts.map +1 -1
  172. package/lib/index.js +19 -19
  173. package/lib/index.js.map +1 -1
  174. package/lib/properties/abstractStaticCollectionProperty.d.ts +10 -10
  175. package/lib/properties/abstractStaticCollectionProperty.d.ts.map +1 -1
  176. package/lib/properties/abstractStaticCollectionProperty.js +70 -53
  177. package/lib/properties/abstractStaticCollectionProperty.js.map +1 -1
  178. package/lib/properties/arrayProperty.d.ts.map +1 -1
  179. package/lib/properties/arrayProperty.js +152 -103
  180. package/lib/properties/arrayProperty.js.map +1 -1
  181. package/lib/properties/baseProperty.d.ts +4 -4
  182. package/lib/properties/baseProperty.d.ts.map +1 -1
  183. package/lib/properties/baseProperty.js +73 -51
  184. package/lib/properties/baseProperty.js.map +1 -1
  185. package/lib/properties/boolProperty.d.ts.map +1 -1
  186. package/lib/properties/boolProperty.js +3 -3
  187. package/lib/properties/boolProperty.js.map +1 -1
  188. package/lib/properties/containerProperty.d.ts +8 -8
  189. package/lib/properties/containerProperty.d.ts.map +1 -1
  190. package/lib/properties/containerProperty.js +33 -26
  191. package/lib/properties/containerProperty.js.map +1 -1
  192. package/lib/properties/enumArrayProperty.d.ts.map +1 -1
  193. package/lib/properties/enumArrayProperty.js +14 -14
  194. package/lib/properties/enumArrayProperty.js.map +1 -1
  195. package/lib/properties/enumProperty.d.ts.map +1 -1
  196. package/lib/properties/enumProperty.js +17 -17
  197. package/lib/properties/enumProperty.js.map +1 -1
  198. package/lib/properties/floatProperties.js +4 -4
  199. package/lib/properties/floatProperties.js.map +1 -1
  200. package/lib/properties/index.d.ts +23 -23
  201. package/lib/properties/index.d.ts.map +1 -1
  202. package/lib/properties/index.js +23 -23
  203. package/lib/properties/index.js.map +1 -1
  204. package/lib/properties/indexedCollectionBaseProperty.d.ts.map +1 -1
  205. package/lib/properties/indexedCollectionBaseProperty.js +47 -37
  206. package/lib/properties/indexedCollectionBaseProperty.js.map +1 -1
  207. package/lib/properties/intProperties.d.ts.map +1 -1
  208. package/lib/properties/intProperties.js +10 -10
  209. package/lib/properties/intProperties.js.map +1 -1
  210. package/lib/properties/lazyLoadedProperties.js.map +1 -1
  211. package/lib/properties/mapProperty.d.ts.map +1 -1
  212. package/lib/properties/mapProperty.js +21 -17
  213. package/lib/properties/mapProperty.js.map +1 -1
  214. package/lib/properties/namedNodeProperty.d.ts.map +1 -1
  215. package/lib/properties/namedNodeProperty.js +3 -3
  216. package/lib/properties/namedNodeProperty.js.map +1 -1
  217. package/lib/properties/namedProperty.d.ts.map +1 -1
  218. package/lib/properties/namedProperty.js +7 -5
  219. package/lib/properties/namedProperty.js.map +1 -1
  220. package/lib/properties/nodeProperty.d.ts.map +1 -1
  221. package/lib/properties/nodeProperty.js +5 -3
  222. package/lib/properties/nodeProperty.js.map +1 -1
  223. package/lib/properties/primitiveTypeCasts.d.ts.map +1 -1
  224. package/lib/properties/primitiveTypeCasts.js +9 -9
  225. package/lib/properties/primitiveTypeCasts.js.map +1 -1
  226. package/lib/properties/referenceArrayProperty.d.ts.map +1 -1
  227. package/lib/properties/referenceArrayProperty.js +31 -25
  228. package/lib/properties/referenceArrayProperty.js.map +1 -1
  229. package/lib/properties/referenceMapProperty.d.ts.map +1 -1
  230. package/lib/properties/referenceMapProperty.js +18 -18
  231. package/lib/properties/referenceMapProperty.js.map +1 -1
  232. package/lib/properties/referenceProperty.d.ts.map +1 -1
  233. package/lib/properties/referenceProperty.js +33 -29
  234. package/lib/properties/referenceProperty.js.map +1 -1
  235. package/lib/properties/setProperty.d.ts.map +1 -1
  236. package/lib/properties/setProperty.js +31 -29
  237. package/lib/properties/setProperty.js.map +1 -1
  238. package/lib/properties/stringProperty.d.ts.map +1 -1
  239. package/lib/properties/stringProperty.js +56 -40
  240. package/lib/properties/stringProperty.js.map +1 -1
  241. package/lib/properties/uintProperties.js +5 -5
  242. package/lib/properties/uintProperties.js.map +1 -1
  243. package/lib/properties/valueArrayProperty.d.ts +1 -1
  244. package/lib/properties/valueArrayProperty.d.ts.map +1 -1
  245. package/lib/properties/valueArrayProperty.js +30 -29
  246. package/lib/properties/valueArrayProperty.js.map +1 -1
  247. package/lib/properties/valueMapProperty.d.ts.map +1 -1
  248. package/lib/properties/valueMapProperty.js +31 -29
  249. package/lib/properties/valueMapProperty.js.map +1 -1
  250. package/lib/properties/valueProperty.d.ts.map +1 -1
  251. package/lib/properties/valueProperty.js +11 -9
  252. package/lib/properties/valueProperty.js.map +1 -1
  253. package/lib/propertyFactory.d.ts.map +1 -1
  254. package/lib/propertyFactory.js +309 -252
  255. package/lib/propertyFactory.js.map +1 -1
  256. package/lib/propertyTemplate.d.ts +17 -17
  257. package/lib/propertyTemplate.d.ts.map +1 -1
  258. package/lib/propertyTemplate.js +64 -45
  259. package/lib/propertyTemplate.js.map +1 -1
  260. package/lib/propertyTemplateWrapper.d.ts.map +1 -1
  261. package/lib/propertyTemplateWrapper.js +40 -25
  262. package/lib/propertyTemplateWrapper.js.map +1 -1
  263. package/lib/propertyUtils.d.ts.map +1 -1
  264. package/lib/propertyUtils.js.map +1 -1
  265. package/package.json +28 -28
  266. package/src/index.d.ts +2750 -2681
@@ -7,24 +7,22 @@
7
7
  * @fileoverview In this file, we will test the int64 map property
8
8
  * object described in /src/properties/valueMapProperty.js
9
9
  */
10
- describe('Int64MapProperty', function () {
10
+ describe("Int64MapProperty", function () {
11
11
  var PropertyFactory, BaseProperty, ChangeSet, myNode, Int64Map, Int64;
12
12
  before(function () {
13
13
  // Get all the objects we need in this test here.
14
- PropertyFactory = require('../..').PropertyFactory;
15
- BaseProperty = require('../..').BaseProperty;
16
- ChangeSet = require('@fluid-experimental/property-changeset').ChangeSet;
17
- Int64 = require('@fluid-experimental/property-common').Int64;
14
+ PropertyFactory = require("../..").PropertyFactory;
15
+ BaseProperty = require("../..").BaseProperty;
16
+ ChangeSet = require("@fluid-experimental/property-changeset").ChangeSet;
17
+ Int64 = require("@fluid-experimental/property-common").Int64;
18
18
  // Register a template with a set property for the tests
19
19
  var TestPropertyTemplate = {
20
- typeid: 'autodesk.tests:Int64MapTestPropertyID-1.0.0',
21
- inherits: ['NamedProperty'],
22
- properties: [
23
- { id: 'Int64Map', typeid: 'Int64', context: 'map' },
24
- ],
20
+ typeid: "autodesk.tests:Int64MapTestPropertyID-1.0.0",
21
+ inherits: ["NamedProperty"],
22
+ properties: [{ id: "Int64Map", typeid: "Int64", context: "map" }],
25
23
  };
26
24
  PropertyFactory._reregister(TestPropertyTemplate);
27
- myNode = PropertyFactory.create('autodesk.tests:Int64MapTestPropertyID-1.0.0');
25
+ myNode = PropertyFactory.create("autodesk.tests:Int64MapTestPropertyID-1.0.0");
28
26
  Int64Map = myNode._properties.Int64Map;
29
27
  });
30
28
  // Helper functions for the test cases
@@ -35,7 +33,7 @@ describe('Int64MapProperty', function () {
35
33
  // Inserts a node with a given key (a new one is generated when undefined)
36
34
  var insertEntryInRootWithKey = function (key, root) {
37
35
  if (key === undefined) {
38
- key = 'node' + keyCounter++;
36
+ key = "node" + keyCounter++;
39
37
  }
40
38
  root._properties.Int64Map.insert(key, new Int64(1, keyCounter));
41
39
  };
@@ -45,7 +43,7 @@ describe('Int64MapProperty', function () {
45
43
  };
46
44
  // Returns a functor that will insert a node with a constant key
47
45
  var insertEntryInRootWithUnqiueKey = function () {
48
- var key = 'node' + keyCounter++;
46
+ var key = "node" + keyCounter++;
49
47
  return insertEntryInRootWithKey.bind(undefined, key);
50
48
  };
51
49
  // Removes the first node from the root
@@ -58,146 +56,155 @@ describe('Int64MapProperty', function () {
58
56
  var firstKey = root._properties.Int64Map.getIds()[0];
59
57
  root._properties.Int64Map.set(firstKey, new Int64(1, root._properties.Int64Map.get(firstKey) + 1));
60
58
  };
61
- describe('Testing creation, assignment and serialization', function () {
62
- it('should be empty at the beginning', function () {
59
+ describe("Testing creation, assignment and serialization", function () {
60
+ it("should be empty at the beginning", function () {
63
61
  expect(Int64Map.getAsArray()).to.be.empty;
64
62
  expect(Int64Map.getEntriesReadOnly()).to.be.empty;
65
- expect(ChangeSet.isEmptyChangeSet(Int64Map.serialize({ 'dirtyOnly': false }))).to.be.ok;
66
- expect(ChangeSet.isEmptyChangeSet(Int64Map.serialize({ 'dirtyOnly': true }))).to.be.ok;
63
+ expect(ChangeSet.isEmptyChangeSet(Int64Map.serialize({ dirtyOnly: false }))).to.be.ok;
64
+ expect(ChangeSet.isEmptyChangeSet(Int64Map.serialize({ dirtyOnly: true }))).to.be.ok;
67
65
  });
68
- it('should be possible to add entries', function () {
69
- Int64Map.insert('value1', new Int64(1, 1));
70
- expect(Int64Map.get('value1')).to.deep.equal(new Int64(1, 1));
71
- Int64Map.insert('value2', new Int64(1, 2));
72
- expect(Int64Map.get('value2')).to.deep.equal(new Int64(1, 2));
73
- Int64Map.insert('value3', new Int64(1, 3));
74
- expect(Int64Map.get('value3')).to.deep.equal(new Int64(1, 3));
75
- Int64Map.insert('value4', '123');
76
- expect(Int64Map.get('value4')).to.deep.equal(new Int64(123, 0));
77
- Int64Map.insert('value5', 123);
78
- expect(Int64Map.get('value5')).to.deep.equal(new Int64(123, 0));
66
+ it("should be possible to add entries", function () {
67
+ Int64Map.insert("value1", new Int64(1, 1));
68
+ expect(Int64Map.get("value1")).to.deep.equal(new Int64(1, 1));
69
+ Int64Map.insert("value2", new Int64(1, 2));
70
+ expect(Int64Map.get("value2")).to.deep.equal(new Int64(1, 2));
71
+ Int64Map.insert("value3", new Int64(1, 3));
72
+ expect(Int64Map.get("value3")).to.deep.equal(new Int64(1, 3));
73
+ Int64Map.insert("value4", "123");
74
+ expect(Int64Map.get("value4")).to.deep.equal(new Int64(123, 0));
75
+ Int64Map.insert("value5", 123);
76
+ expect(Int64Map.get("value5")).to.deep.equal(new Int64(123, 0));
79
77
  expect(Int64Map.getEntriesReadOnly()).to.deep.equal({
80
- 'value1': new Int64(1, 1), 'value2': new Int64(1, 2), 'value3': new Int64(1, 3),
81
- 'value4': new Int64(123, 0), 'value5': new Int64(123, 0),
78
+ value1: new Int64(1, 1),
79
+ value2: new Int64(1, 2),
80
+ value3: new Int64(1, 3),
81
+ value4: new Int64(123, 0),
82
+ value5: new Int64(123, 0),
82
83
  });
83
- expect(Int64Map.has('value1')).to.be.ok;
84
- expect(Int64Map.has('value2')).to.be.ok;
85
- expect(Int64Map.has('value3')).to.be.ok;
86
- expect(Int64Map.has('value4')).to.be.ok;
87
- expect(Int64Map.has('value5')).to.be.ok;
88
- expect(Int64Map.serialize({ 'dirtyOnly': false })).to.deep.equal({
89
- insert: { 'value1': [1, 1], 'value2': [1, 2], 'value3': [1, 3], 'value4': [123, 0], 'value5': [123, 0] },
84
+ expect(Int64Map.has("value1")).to.be.ok;
85
+ expect(Int64Map.has("value2")).to.be.ok;
86
+ expect(Int64Map.has("value3")).to.be.ok;
87
+ expect(Int64Map.has("value4")).to.be.ok;
88
+ expect(Int64Map.has("value5")).to.be.ok;
89
+ expect(Int64Map.serialize({ dirtyOnly: false })).to.deep.equal({
90
+ insert: {
91
+ value1: [1, 1],
92
+ value2: [1, 2],
93
+ value3: [1, 3],
94
+ value4: [123, 0],
95
+ value5: [123, 0],
96
+ },
90
97
  });
91
98
  });
92
- it('should be possible to remove entries', function () {
93
- Int64Map.remove('value1');
94
- expect(Int64Map.has('value1')).to.be.not.ok;
95
- Int64Map.remove('value2');
96
- expect(Int64Map.has('value2')).to.be.not.ok;
97
- Int64Map.remove('value3');
98
- expect(Int64Map.has('value3')).to.be.not.ok;
99
- Int64Map.remove('value4');
100
- expect(Int64Map.has('value4')).to.be.not.ok;
101
- Int64Map.remove('value5');
102
- expect(Int64Map.has('value5')).to.be.not.ok;
103
- expect(ChangeSet.isEmptyChangeSet(Int64Map.serialize({ 'dirtyOnly': false }))).to.be.ok;
99
+ it("should be possible to remove entries", function () {
100
+ Int64Map.remove("value1");
101
+ expect(Int64Map.has("value1")).to.be.not.ok;
102
+ Int64Map.remove("value2");
103
+ expect(Int64Map.has("value2")).to.be.not.ok;
104
+ Int64Map.remove("value3");
105
+ expect(Int64Map.has("value3")).to.be.not.ok;
106
+ Int64Map.remove("value4");
107
+ expect(Int64Map.has("value4")).to.be.not.ok;
108
+ Int64Map.remove("value5");
109
+ expect(Int64Map.has("value5")).to.be.not.ok;
110
+ expect(ChangeSet.isEmptyChangeSet(Int64Map.serialize({ dirtyOnly: false }))).to.be.ok;
104
111
  });
105
- it('a remove followed by an insert should become a modify', function () {
106
- Int64Map.insert('value1', new Int64(1, 1));
112
+ it("a remove followed by an insert should become a modify", function () {
113
+ Int64Map.insert("value1", new Int64(1, 1));
107
114
  Int64Map.cleanDirty(BaseProperty.MODIFIED_STATE_FLAGS.DIRTY |
108
115
  BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE);
109
- Int64Map.remove('value1');
110
- Int64Map.insert('value1', new Int64(1, 2));
111
- expect(Int64Map.serialize({ 'dirtyOnly': true })).to.deep.equal({
112
- modify: { 'value1': [1, 2] },
116
+ Int64Map.remove("value1");
117
+ Int64Map.insert("value1", new Int64(1, 2));
118
+ expect(Int64Map.serialize({ dirtyOnly: true })).to.deep.equal({
119
+ modify: { value1: [1, 2] },
113
120
  });
114
121
  // This should also work for a set operation
115
- Int64Map.set('value1', new Int64(1, 3));
116
- expect(Int64Map.serialize({ 'dirtyOnly': true })).to.deep.equal({
117
- modify: { 'value1': [1, 3] },
122
+ Int64Map.set("value1", new Int64(1, 3));
123
+ expect(Int64Map.serialize({ dirtyOnly: true })).to.deep.equal({
124
+ modify: { value1: [1, 3] },
118
125
  });
119
126
  // But setting the same value should give an empty ChangeSet
120
127
  Int64Map.cleanDirty(BaseProperty.MODIFIED_STATE_FLAGS.DIRTY |
121
128
  BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE);
122
- Int64Map.set('value1', new Int64(1, 3));
123
- expect(ChangeSet.isEmptyChangeSet(Int64Map.serialize({ 'dirtyOnly': true }))).to.be.ok;
129
+ Int64Map.set("value1", new Int64(1, 3));
130
+ expect(ChangeSet.isEmptyChangeSet(Int64Map.serialize({ dirtyOnly: true }))).to.be.ok;
124
131
  // This should be tracked separately for dirtyness and pending changes
125
132
  Int64Map.cleanDirty(BaseProperty.MODIFIED_STATE_FLAGS.DIRTY |
126
133
  BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE);
127
- Int64Map.remove('value1');
134
+ Int64Map.remove("value1");
128
135
  Int64Map.cleanDirty(BaseProperty.MODIFIED_STATE_FLAGS.DIRTY);
129
- Int64Map.insert('value1', new Int64(1, 2));
136
+ Int64Map.insert("value1", new Int64(1, 2));
130
137
  expect(Int64Map.serialize({
131
- 'dirtyOnly': true,
132
- 'includeRootTypeid': false,
133
- 'dirtinessType': BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE,
138
+ dirtyOnly: true,
139
+ includeRootTypeid: false,
140
+ dirtinessType: BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE,
134
141
  })).to.deep.equal({
135
- modify: { 'value1': [1, 2] },
142
+ modify: { value1: [1, 2] },
136
143
  });
137
144
  expect(Int64Map.serialize({
138
- 'dirtyOnly': true,
139
- 'includeRootTypeid': false,
140
- 'dirtinessType': BaseProperty.MODIFIED_STATE_FLAGS.DIRTY,
145
+ dirtyOnly: true,
146
+ includeRootTypeid: false,
147
+ dirtinessType: BaseProperty.MODIFIED_STATE_FLAGS.DIRTY,
141
148
  })).to.deep.equal({
142
- insert: { 'value1': [1, 2] },
149
+ insert: { value1: [1, 2] },
143
150
  });
144
151
  });
145
- it('deserialize should work', function () {
146
- var myInitialStateNode = PropertyFactory.create('autodesk.tests:Int64MapTestPropertyID-1.0.0');
147
- myInitialStateNode._properties.Int64Map.insert('value1', new Int64(1, 1));
148
- myInitialStateNode._properties.Int64Map.insert('value2', new Int64(1, 2));
149
- var initialChangeSet = myInitialStateNode.serialize({ 'dirtyOnly': false });
152
+ it("deserialize should work", function () {
153
+ var myInitialStateNode = PropertyFactory.create("autodesk.tests:Int64MapTestPropertyID-1.0.0");
154
+ myInitialStateNode._properties.Int64Map.insert("value1", new Int64(1, 1));
155
+ myInitialStateNode._properties.Int64Map.insert("value2", new Int64(1, 2));
156
+ var initialChangeSet = myInitialStateNode.serialize({ dirtyOnly: false });
150
157
  // Deserialize a copy into a second node and check that the chageset is correct
151
- var myDeserializeNode1 = PropertyFactory.create('autodesk.tests:Int64MapTestPropertyID-1.0.0');
158
+ var myDeserializeNode1 = PropertyFactory.create("autodesk.tests:Int64MapTestPropertyID-1.0.0");
152
159
  var changes = myDeserializeNode1.deserialize(initialChangeSet);
153
160
  expect(changes).to.deep.equal(initialChangeSet);
154
- expect(myDeserializeNode1.serialize({ 'dirtyOnly': false })).to.deep.equal(myInitialStateNode.serialize({ 'dirtyOnly': false }));
161
+ expect(myDeserializeNode1.serialize({ dirtyOnly: false })).to.deep.equal(myInitialStateNode.serialize({ dirtyOnly: false }));
155
162
  myDeserializeNode1.cleanDirty(BaseProperty.MODIFIED_STATE_FLAGS.DIRTY |
156
163
  BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE);
157
164
  // Create a third copy
158
- var myDeserializeNode2 = PropertyFactory.create('autodesk.tests:Int64MapTestPropertyID-1.0.0');
165
+ var myDeserializeNode2 = PropertyFactory.create("autodesk.tests:Int64MapTestPropertyID-1.0.0");
159
166
  myDeserializeNode2.deserialize(initialChangeSet);
160
167
  myDeserializeNode2.cleanDirty(BaseProperty.MODIFIED_STATE_FLAGS.DIRTY |
161
168
  BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE);
162
169
  myInitialStateNode.cleanDirty(BaseProperty.MODIFIED_STATE_FLAGS.DIRTY |
163
170
  BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE);
164
- myInitialStateNode._properties.Int64Map.set('value1', new Int64(1, 2));
165
- myInitialStateNode._properties.Int64Map.remove('value2');
166
- myInitialStateNode._properties.Int64Map.insert('value3', new Int64(1, 3));
167
- var changesChangeSet = myInitialStateNode.serialize({ 'dirtyOnly': true });
168
- var fullChangeSet = myInitialStateNode.serialize({ 'dirtyOnly': false });
171
+ myInitialStateNode._properties.Int64Map.set("value1", new Int64(1, 2));
172
+ myInitialStateNode._properties.Int64Map.remove("value2");
173
+ myInitialStateNode._properties.Int64Map.insert("value3", new Int64(1, 3));
174
+ var changesChangeSet = myInitialStateNode.serialize({ dirtyOnly: true });
175
+ var fullChangeSet = myInitialStateNode.serialize({ dirtyOnly: false });
169
176
  var reportedChanges = myDeserializeNode1.deserialize(fullChangeSet);
170
- expect(myDeserializeNode1.serialize({ 'dirtyOnly': false })).to.deep.equal(myInitialStateNode.serialize({ 'dirtyOnly': false }));
177
+ expect(myDeserializeNode1.serialize({ dirtyOnly: false })).to.deep.equal(myInitialStateNode.serialize({ dirtyOnly: false }));
171
178
  expect(reportedChanges).to.deep.equal(changesChangeSet);
172
- expect(myDeserializeNode1.serialize({ 'dirtyOnly': true })).to.deep.equal(changesChangeSet);
179
+ expect(myDeserializeNode1.serialize({ dirtyOnly: true })).to.deep.equal(changesChangeSet);
173
180
  var deserializeChanges = myDeserializeNode2.deserialize(fullChangeSet);
174
181
  expect(deserializeChanges).to.deep.equal(changesChangeSet);
175
182
  });
176
- it('inserting the same key twice should throw an exception', function () {
177
- var rootNode = PropertyFactory.create('autodesk.tests:Int64MapTestPropertyID-1.0.0');
178
- rootNode._properties.Int64Map.insert('node1', new Int64(1, 1));
183
+ it("inserting the same key twice should throw an exception", function () {
184
+ var rootNode = PropertyFactory.create("autodesk.tests:Int64MapTestPropertyID-1.0.0");
185
+ rootNode._properties.Int64Map.insert("node1", new Int64(1, 1));
179
186
  expect(function () {
180
- rootNode._properties.Int64Map.insert('node1', new Int64(1, 2));
187
+ rootNode._properties.Int64Map.insert("node1", new Int64(1, 2));
181
188
  }).to.throw();
182
189
  });
183
- it('set should overwrite existing entry', function () {
184
- var rootNode = PropertyFactory.create('autodesk.tests:Int64MapTestPropertyID-1.0.0');
185
- rootNode._properties.Int64Map.set('node1', new Int64(1, 0));
186
- rootNode._properties.Int64Map.set('node1', new Int64(1, 1));
190
+ it("set should overwrite existing entry", function () {
191
+ var rootNode = PropertyFactory.create("autodesk.tests:Int64MapTestPropertyID-1.0.0");
192
+ rootNode._properties.Int64Map.set("node1", new Int64(1, 0));
193
+ rootNode._properties.Int64Map.set("node1", new Int64(1, 1));
187
194
  // the set should overwrite the insert
188
- expect(rootNode.serialize({ 'dirtyOnly': true })['map<Int64>'].Int64Map).to.have.all.keys('insert');
195
+ expect(rootNode.serialize({ dirtyOnly: true })["map<Int64>"].Int64Map).to.have.all.keys("insert");
189
196
  // Overwriting with the same property shouldn't dirty the node
190
197
  rootNode.cleanDirty(BaseProperty.MODIFIED_STATE_FLAGS.DIRTY |
191
198
  BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE);
192
- rootNode._properties.Int64Map.set('node1', new Int64(1, 1));
193
- expect(ChangeSet.isEmptyChangeSet(rootNode.serialize({ 'dirtyOnly': true }))).to.be.ok;
199
+ rootNode._properties.Int64Map.set("node1", new Int64(1, 1));
200
+ expect(ChangeSet.isEmptyChangeSet(rootNode.serialize({ dirtyOnly: true }))).to.be.ok;
194
201
  expect(rootNode.isDirty()).to.be.false;
195
202
  // Overwriting with a different value should result in a modify
196
- rootNode._properties.Int64Map.set('node1', new Int64(1, 2));
197
- expect(rootNode.serialize({ 'dirtyOnly': true })['map<Int64>'].Int64Map).to.have.all.keys('modify');
203
+ rootNode._properties.Int64Map.set("node1", new Int64(1, 2));
204
+ expect(rootNode.serialize({ dirtyOnly: true })["map<Int64>"].Int64Map).to.have.all.keys("modify");
198
205
  });
199
206
  });
200
- describe('squashing', function () {
207
+ describe("squashing", function () {
201
208
  //
202
209
  // Helper function which takes a sequence of callbacks that are suceessively executed
203
210
  // and the changes applied by the callbacks are separately tracked and squashed in a
@@ -208,19 +215,19 @@ describe('Int64MapProperty', function () {
208
215
  //
209
216
  var testChangeSetSquashing = function (in_options) {
210
217
  resetKeyCounter();
211
- var testProperty = PropertyFactory.create('autodesk.tests:Int64MapTestPropertyID-1.0.0');
218
+ var testProperty = PropertyFactory.create("autodesk.tests:Int64MapTestPropertyID-1.0.0");
212
219
  var callbacks = in_options.callbacks;
213
220
  if (in_options.pre) {
214
221
  in_options.pre(testProperty);
215
222
  }
216
- var initialChangeset = new ChangeSet(testProperty.serialize({ 'dirtyOnly': false }));
223
+ var initialChangeset = new ChangeSet(testProperty.serialize({ dirtyOnly: false }));
217
224
  initialChangeset.setIsNormalized(true);
218
225
  var squashedChangeset = new ChangeSet();
219
226
  testProperty.cleanDirty(BaseProperty.MODIFIED_STATE_FLAGS.DIRTY |
220
227
  BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE);
221
228
  for (var i = 0; i < callbacks.length; i++) {
222
229
  callbacks[i](testProperty);
223
- var changes = testProperty.serialize({ 'dirtyOnly': true });
230
+ var changes = testProperty.serialize({ dirtyOnly: true });
224
231
  testProperty.cleanDirty(BaseProperty.MODIFIED_STATE_FLAGS.DIRTY |
225
232
  BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE);
226
233
  squashedChangeset.applyChangeSet(changes);
@@ -229,25 +236,38 @@ describe('Int64MapProperty', function () {
229
236
  in_options.post(squashedChangeset.getSerializedChangeSet());
230
237
  }
231
238
  initialChangeset.applyChangeSet(squashedChangeset.getSerializedChangeSet());
232
- expect(initialChangeset.getSerializedChangeSet()).to.deep.equal(testProperty.serialize({ 'dirtyOnly': false }));
239
+ expect(initialChangeset.getSerializedChangeSet()).to.deep.equal(testProperty.serialize({ dirtyOnly: false }));
233
240
  };
234
- it('should work for multiple independent inserts', function () {
235
- testChangeSetSquashing({ callbacks: [insertNodeInRoot, insertNodeInRoot, insertNodeInRoot] });
241
+ it("should work for multiple independent inserts", function () {
242
+ testChangeSetSquashing({
243
+ callbacks: [insertNodeInRoot, insertNodeInRoot, insertNodeInRoot],
244
+ });
236
245
  });
237
- it('should work for inserts followed by removes', function () {
246
+ it("should work for inserts followed by removes", function () {
238
247
  testChangeSetSquashing({
239
- callbacks: [insertNodeInRoot, insertNodeInRoot, removeFirstNodeInRoot, removeFirstNodeInRoot],
248
+ callbacks: [
249
+ insertNodeInRoot,
250
+ insertNodeInRoot,
251
+ removeFirstNodeInRoot,
252
+ removeFirstNodeInRoot,
253
+ ],
240
254
  post: function (changeset) {
241
255
  expect(changeset).to.be.empty;
242
256
  },
243
257
  });
244
258
  });
245
- it('of inserts and modifies should work', function () {
259
+ it("of inserts and modifies should work", function () {
246
260
  testChangeSetSquashing({
247
- callbacks: [insertNodeInRoot, insertNodeInRoot, insertNodeInRoot, modifyEntry, modifyEntry],
261
+ callbacks: [
262
+ insertNodeInRoot,
263
+ insertNodeInRoot,
264
+ insertNodeInRoot,
265
+ modifyEntry,
266
+ modifyEntry,
267
+ ],
248
268
  });
249
269
  });
250
- it('an insert, modify and a remove should give an empty changeset', function () {
270
+ it("an insert, modify and a remove should give an empty changeset", function () {
251
271
  testChangeSetSquashing({
252
272
  callbacks: [insertNodeInRoot, modifyEntry, modifyEntry, removeFirstNodeInRoot],
253
273
  post: function (changeset) {
@@ -255,51 +275,51 @@ describe('Int64MapProperty', function () {
255
275
  },
256
276
  });
257
277
  });
258
- it('should work for modifies after an already existing insert', function () {
278
+ it("should work for modifies after an already existing insert", function () {
259
279
  testChangeSetSquashing({
260
280
  pre: insertNodeInRoot,
261
281
  callbacks: [modifyEntry, modifyEntry],
262
282
  });
263
283
  });
264
- it('of modify and remove after an already existing insert should work', function () {
284
+ it("of modify and remove after an already existing insert should work", function () {
265
285
  testChangeSetSquashing({
266
286
  pre: insertNodeInRoot,
267
287
  callbacks: [modifyEntry, removeFirstNodeInRoot],
268
288
  post: function (changeset) {
269
- expect(changeset['map<Int64>'].Int64Map).to.have.all.keys('remove');
289
+ expect(changeset["map<Int64>"].Int64Map).to.have.all.keys("remove");
270
290
  },
271
291
  });
272
292
  });
273
- it('of remove and insert should result in modify', function () {
293
+ it("of remove and insert should result in modify", function () {
274
294
  // Create two nodes with the same GUID
275
295
  testChangeSetSquashing({
276
296
  pre: function (root) {
277
- root._properties.Int64Map.insert('node1', new Int64(1, 1));
297
+ root._properties.Int64Map.insert("node1", new Int64(1, 1));
278
298
  },
279
299
  callbacks: [
280
300
  removeFirstNodeInRoot,
281
301
  function (root) {
282
- root._properties.Int64Map.insert('node1', new Int64(1, 2));
302
+ root._properties.Int64Map.insert("node1", new Int64(1, 2));
283
303
  },
284
304
  ],
285
305
  post: function (changeset) {
286
- expect(changeset['map<Int64>'].Int64Map).to.have.all.keys('modify');
306
+ expect(changeset["map<Int64>"].Int64Map).to.have.all.keys("modify");
287
307
  },
288
308
  });
289
309
  });
290
310
  });
291
- describe('Rebasing', function () {
311
+ describe("Rebasing", function () {
292
312
  var testRebasing = function (in_options) {
293
313
  // Prepare the initial state
294
- var baseProperty1 = PropertyFactory.create('autodesk.tests:Int64MapTestPropertyID-1.0.0');
314
+ var baseProperty1 = PropertyFactory.create("autodesk.tests:Int64MapTestPropertyID-1.0.0");
295
315
  if (in_options.prepare) {
296
316
  in_options.prepare(baseProperty1);
297
317
  }
298
318
  // Create two copies of this state
299
- var baseProperty2 = PropertyFactory.create('autodesk.tests:Int64MapTestPropertyID-1.0.0');
300
- baseProperty2.deserialize(baseProperty1.serialize({ 'dirtyOnly': false }));
301
- var baseProperty3 = PropertyFactory.create('autodesk.tests:Int64MapTestPropertyID-1.0.0');
302
- baseProperty3.deserialize(baseProperty1.serialize({ 'dirtyOnly': false }));
319
+ var baseProperty2 = PropertyFactory.create("autodesk.tests:Int64MapTestPropertyID-1.0.0");
320
+ baseProperty2.deserialize(baseProperty1.serialize({ dirtyOnly: false }));
321
+ var baseProperty3 = PropertyFactory.create("autodesk.tests:Int64MapTestPropertyID-1.0.0");
322
+ baseProperty3.deserialize(baseProperty1.serialize({ dirtyOnly: false }));
303
323
  // Make sure the states are clear
304
324
  baseProperty1.cleanDirty(BaseProperty.MODIFIED_STATE_FLAGS.DIRTY |
305
325
  BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE);
@@ -307,7 +327,7 @@ describe('Int64MapProperty', function () {
307
327
  BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE);
308
328
  baseProperty3.cleanDirty(BaseProperty.MODIFIED_STATE_FLAGS.DIRTY |
309
329
  BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE);
310
- var initialChangeSet = baseProperty1.serialize({ 'dirtyOnly': false });
330
+ var initialChangeSet = baseProperty1.serialize({ dirtyOnly: false });
311
331
  // Apply the operations to the two properties in parallel
312
332
  if (in_options.op1) {
313
333
  in_options.op1(baseProperty1);
@@ -316,8 +336,8 @@ describe('Int64MapProperty', function () {
316
336
  in_options.op2(baseProperty2);
317
337
  }
318
338
  // Get the ChangeSets
319
- var changeSet1 = new ChangeSet(baseProperty1.serialize({ 'dirtyOnly': true }));
320
- var changeSet2 = baseProperty2.serialize({ 'dirtyOnly': true });
339
+ var changeSet1 = new ChangeSet(baseProperty1.serialize({ dirtyOnly: true }));
340
+ var changeSet2 = baseProperty2.serialize({ dirtyOnly: true });
321
341
  // Perform the actual rebase
322
342
  var conflicts = [];
323
343
  changeSet1._rebaseChangeSet(changeSet2, conflicts);
@@ -332,55 +352,55 @@ describe('Int64MapProperty', function () {
332
352
  if (in_options.op2) {
333
353
  in_options.op2(baseProperty3);
334
354
  }
335
- var finalChangeSet = baseProperty3.serialize({ 'dirtyOnly': false });
355
+ var finalChangeSet = baseProperty3.serialize({ dirtyOnly: false });
336
356
  expect(finalChangeSet).to.be.deep.equal(combinedChangeSet.getSerializedChangeSet());
337
357
  }
338
358
  if (in_options.checkResult) {
339
359
  in_options.checkResult(conflicts, changeSet2, combinedChangeSet);
340
360
  }
341
361
  };
342
- it('with a NOP should be possible', function () {
362
+ it("with a NOP should be possible", function () {
343
363
  testRebasing({
344
364
  op2: insertEntryInRootWithUnqiueKey(),
345
365
  compareToSequential: true,
346
366
  });
347
367
  });
348
- it('with independent inserts should be possible', function () {
368
+ it("with independent inserts should be possible", function () {
349
369
  testRebasing({
350
370
  op1: insertEntryInRootWithUnqiueKey(),
351
371
  op2: insertEntryInRootWithUnqiueKey(),
352
372
  compareToSequential: true,
353
373
  });
354
374
  });
355
- it('with independent removes should be possible', function () {
375
+ it("with independent removes should be possible", function () {
356
376
  testRebasing({
357
377
  prepare: function (root) {
358
- root._properties.Int64Map.insert('entry1', new Int64(1, 1));
359
- root._properties.Int64Map.insert('entry2', new Int64(1, 2));
378
+ root._properties.Int64Map.insert("entry1", new Int64(1, 1));
379
+ root._properties.Int64Map.insert("entry2", new Int64(1, 2));
360
380
  },
361
381
  op1: function (root) {
362
- root._properties.Int64Map.remove('entry1');
382
+ root._properties.Int64Map.remove("entry1");
363
383
  },
364
384
  op2: function (root) {
365
- root._properties.Int64Map.remove('entry2');
385
+ root._properties.Int64Map.remove("entry2");
366
386
  },
367
387
  compareToSequential: true,
368
388
  });
369
389
  });
370
- it('with a modify and a remove should possible', function () {
390
+ it("with a modify and a remove should possible", function () {
371
391
  testRebasing({
372
392
  prepare: function (root) {
373
- root._properties.Int64Map.insert('entry1', new Int64(1, 1));
393
+ root._properties.Int64Map.insert("entry1", new Int64(1, 1));
374
394
  },
375
395
  op1: modifyEntry,
376
396
  op2: removeFirstNodeInRoot,
377
397
  compareToSequential: true,
378
398
  });
379
399
  });
380
- it('with a remove and a modify should possible', function () {
400
+ it("with a remove and a modify should possible", function () {
381
401
  testRebasing({
382
402
  prepare: function (root) {
383
- root._properties.Int64Map.insert('entry1', new Int64(1, 1));
403
+ root._properties.Int64Map.insert("entry1", new Int64(1, 1));
384
404
  },
385
405
  op1: removeFirstNodeInRoot,
386
406
  op2: modifyEntry,
@@ -388,21 +408,21 @@ describe('Int64MapProperty', function () {
388
408
  checkResult: function (conflicts, changeSet) {
389
409
  expect(conflicts).to.have.length(1);
390
410
  expect(conflicts[0].type).to.be.equal(ChangeSet.ConflictType.ENTRY_MODIFIED_AFTER_REMOVE);
391
- expect(conflicts[0].path).to.be.equal('Int64Map[entry1]');
411
+ expect(conflicts[0].path).to.be.equal("Int64Map[entry1]");
392
412
  expect(ChangeSet.isEmptyChangeSet(changeSet)).to.be.ok;
393
413
  },
394
414
  });
395
415
  });
396
- it('with two compatible removes should be possible', function () {
416
+ it("with two compatible removes should be possible", function () {
397
417
  testRebasing({
398
418
  prepare: function (root) {
399
- root._properties.Int64Map.insert('entry1', new Int64(1, 1));
419
+ root._properties.Int64Map.insert("entry1", new Int64(1, 1));
400
420
  },
401
421
  op1: function (root) {
402
- root._properties.Int64Map.remove('entry1');
422
+ root._properties.Int64Map.remove("entry1");
403
423
  },
404
424
  op2: function (root) {
405
- root._properties.Int64Map.remove('entry1');
425
+ root._properties.Int64Map.remove("entry1");
406
426
  },
407
427
  compareToSequential: false,
408
428
  checkResult: function (conflicts, changeSet) {
@@ -410,79 +430,78 @@ describe('Int64MapProperty', function () {
410
430
  },
411
431
  });
412
432
  });
413
- it('with two conflicting modifies should be possible and report a conflict', function () {
433
+ it("with two conflicting modifies should be possible and report a conflict", function () {
414
434
  testRebasing({
415
435
  prepare: function (root) {
416
- root._properties.Int64Map.insert('entry1', new Int64(1, 1));
436
+ root._properties.Int64Map.insert("entry1", new Int64(1, 1));
417
437
  },
418
438
  op1: function (root) {
419
- root._properties.Int64Map.set('entry1', new Int64(1, 2));
439
+ root._properties.Int64Map.set("entry1", new Int64(1, 2));
420
440
  },
421
441
  op2: function (root) {
422
- root._properties.Int64Map.set('entry1', new Int64(1, 3));
442
+ root._properties.Int64Map.set("entry1", new Int64(1, 3));
423
443
  },
424
444
  compareToSequential: true,
425
445
  checkResult: function (conflicts, changeSet) {
426
446
  expect(conflicts).to.have.length(1);
427
447
  expect(conflicts[0].type).to.be.equal(ChangeSet.ConflictType.COLLIDING_SET);
428
- expect(conflicts[0].path).to.be.equal('Int64Map[entry1]');
448
+ expect(conflicts[0].path).to.be.equal("Int64Map[entry1]");
429
449
  },
430
450
  });
431
451
  });
432
- it('with modify followed by remove+insert should be a conflicting set', function () {
452
+ it("with modify followed by remove+insert should be a conflicting set", function () {
433
453
  testRebasing({
434
454
  prepare: function (root) {
435
- root._properties.Int64Map.insert('entry1', new Int64(1, 1));
455
+ root._properties.Int64Map.insert("entry1", new Int64(1, 1));
436
456
  },
437
457
  op1: modifyEntry,
438
458
  op2: function (root) {
439
- root._properties.Int64Map.remove('entry1');
440
- root._properties.Int64Map.insert('entry1', new Int64(1, 2));
459
+ root._properties.Int64Map.remove("entry1");
460
+ root._properties.Int64Map.insert("entry1", new Int64(1, 2));
441
461
  },
442
462
  compareToSequential: true,
443
463
  checkResult: function (conflicts, changeSet) {
444
464
  expect(conflicts).to.have.length(1);
445
465
  expect(conflicts[0].type).to.be.equal(ChangeSet.ConflictType.COLLIDING_SET);
446
- expect(conflicts[0].path).to.be.equal('Int64Map[entry1]');
466
+ expect(conflicts[0].path).to.be.equal("Int64Map[entry1]");
447
467
  },
448
468
  });
449
469
  });
450
- it('with remove+insert followed by modify should be a conflicting set', function () {
470
+ it("with remove+insert followed by modify should be a conflicting set", function () {
451
471
  testRebasing({
452
472
  prepare: function (root) {
453
- root._properties.Int64Map.insert('entry1', new Int64(1, 1));
473
+ root._properties.Int64Map.insert("entry1", new Int64(1, 1));
454
474
  },
455
475
  op1: function (root) {
456
- root._properties.Int64Map.remove('entry1');
457
- root._properties.Int64Map.insert('entry1', new Int64(1, 2));
476
+ root._properties.Int64Map.remove("entry1");
477
+ root._properties.Int64Map.insert("entry1", new Int64(1, 2));
458
478
  },
459
479
  op2: function (root) {
460
- root._properties.Int64Map.set('entry1', new Int64(1, 3));
480
+ root._properties.Int64Map.set("entry1", new Int64(1, 3));
461
481
  },
462
482
  compareToSequential: true,
463
483
  checkResult: function (conflicts, changeSet) {
464
484
  expect(conflicts).to.have.length(1);
465
485
  expect(conflicts[0].type).to.be.equal(ChangeSet.ConflictType.COLLIDING_SET);
466
- expect(conflicts[0].path).to.be.equal('Int64Map[entry1]');
486
+ expect(conflicts[0].path).to.be.equal("Int64Map[entry1]");
467
487
  },
468
488
  });
469
489
  });
470
- it('with conflicting inserts should report conflict', function () {
490
+ it("with conflicting inserts should report conflict", function () {
471
491
  testRebasing({
472
- prepare: function (root) {
473
- },
492
+ prepare: function (root) { },
474
493
  op1: function (root) {
475
- root._properties.Int64Map.insert('entry1', new Int64(1, 1));
494
+ root._properties.Int64Map.insert("entry1", new Int64(1, 1));
476
495
  },
477
496
  op2: function (root) {
478
- root._properties.Int64Map.insert('entry1', new Int64(1, 2));
497
+ root._properties.Int64Map.insert("entry1", new Int64(1, 2));
479
498
  },
480
499
  compareToSequential: false,
481
500
  checkResult: function (conflicts, changeSet) {
482
- expect(changeSet['map<Int64>'].Int64Map).to.have.all.keys('modify');
501
+ expect(changeSet["map<Int64>"].Int64Map).to.have.all.keys("modify");
483
502
  expect(conflicts).to.have.length(1);
484
503
  expect(conflicts[0].type).to.be.equal(ChangeSet.ConflictType.COLLIDING_SET);
485
- expect(conflicts[0].path).to.be.equal('Int64Map[entry1]');
504
+ expect(conflicts[0].path).to.be.equal("Int64Map[entry1]");
486
505
  },
487
506
  });
488
507
  });