kirill-stepanishin commented on code in PR #3340:
URL: https://github.com/apache/tinkerpop/pull/3340#discussion_r2990258163


##########
gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/gremlin-lang-test.js:
##########
@@ -309,10 +309,40 @@ describe('GremlinLang', function () {
       assert.strictEqual(g.V(new 
Long('9007199254740993')).getGremlinLang().getGremlin(), 
'g.V(9007199254740993L)');
     });
 
+    it('should handle bigint as BigInteger (N suffix)', function () {
+      assert.strictEqual(g.inject(BigInt(5)).getGremlinLang().getGremlin(), 
'g.inject(5N)');
+      
assert.strictEqual(g.inject(BigInt('9223372036854775807')).getGremlinLang().getGremlin(),
 'g.inject(9223372036854775807N)');
+      
assert.strictEqual(g.inject(BigInt(10)**BigInt(30)).getGremlinLang().getGremlin(),
 'g.inject(1000000000000000000000000000000N)');
+    });
+
+    it('should handle number integer in Int32 range', function () {
+      assert.strictEqual(g.inject(42).getGremlinLang().getGremlin(), 
'g.inject(42)');

Review Comment:
   I can't really judge how big the performance gain would be. The current JS 
behaviour is consistent with all five GLVs that emit Int32 values without any 
suffix. If the performance gain is tangible, perhaps it's an update worth 
making across the board in the future



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to