Skip to content

Commit

Permalink
Lints codebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
zorkow committed Jan 20, 2018
1 parent e298485 commit 8cacbbc
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/rule_engine/speech_rule_engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ sre.SpeechRuleEngine.prototype.updateConstraint_ = function() {
// Get the trie exceptions
props[sre.DynamicCstr.Axis.LOCALE] = [exists ? values[0] : defLocale];
exists = exists ? exists :
this.activeStore_.trie.hasSubtrie([defLocale, values[1]]);
this.activeStore_.trie.hasSubtrie([defLocale, values[1]]);
props[sre.DynamicCstr.Axis.DOMAIN] = [exists ? values[1] : defDomain];
var order = dynamic.getOrder();
order.forEach(function(axis) {
Expand Down
4 changes: 2 additions & 2 deletions src/speech_rules/abstraction_rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -675,10 +675,10 @@ sre.AbstractionRules.initAbstractionRules_ = function() {
'self::row', '@alternative', '*'
);
defineSpecialisedRule(
'abstr-row', 'mathspeak.default', 'mathspeak.brief'
'abstr-row', 'mathspeak.default', 'mathspeak.brief'
);
defineSpecialisedRule(
'abstr-row', 'mathspeak.default', 'mathspeak.sbrief'
'abstr-row', 'mathspeak.default', 'mathspeak.sbrief'
);
defineRule(
'abstr-cell', 'mathspeak.default',
Expand Down
4 changes: 2 additions & 2 deletions src/speech_rules/abstraction_spanish.js
Original file line number Diff line number Diff line change
Expand Up @@ -675,10 +675,10 @@ sre.AbstractionSpanish.initAbstractionSpanish_ = function() {
'self::row', '@alternative', '*'
);
defineSpecialisedRule(
'abstr-row', 'mathspeak.default', 'mathspeak.brief'
'abstr-row', 'mathspeak.default', 'mathspeak.brief'
);
defineSpecialisedRule(
'abstr-row', 'mathspeak.default', 'mathspeak.sbrief'
'abstr-row', 'mathspeak.default', 'mathspeak.sbrief'
);
defineRule(
'abstr-cell', 'mathspeak.default',
Expand Down
8 changes: 4 additions & 4 deletions tests/mmlcloud_english_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ sre.MmlcloudEnglishTest.prototype.testRelationsWithEmpty = function() {
*/
sre.MmlcloudEnglishTest.prototype.testLabelledRow = function() {
var mml = '<mtable><mlabeledtr><mtd><mi>(1)</mi></mtd>' +
'<mtd><mi>a</mi></mtd><mtd><mi>b</mi></mtd></mlabeledtr></mtable>';
'<mtd><mi>a</mi></mtd><mtd><mi>b</mi></mtd></mlabeledtr></mtable>';
this.executeRuleTest(mml, 'StartLayout 1st Row with Label' +
' left-parenthesis 1 right-parenthesis EndLabel 1st' +
' Column a 2nd Column b EndLayout', 'default');
Expand All @@ -536,7 +536,7 @@ sre.MmlcloudEnglishTest.prototype.testLabelledRow = function() {
*/
sre.MmlcloudEnglishTest.prototype.testLabelledLine = function() {
var mml = '<mtable><mlabeledtr><mtd><mi>(1)</mi></mtd>' +
'<mtd><mi>a</mi></mtd></mlabeledtr></mtable>';
'<mtd><mi>a</mi></mtd></mlabeledtr></mtable>';
this.executeRuleTest(mml, 'StartLayout 1st Row with Label' +
' left-parenthesis 1 right-parenthesis EndLabel' +
' a EndLayout', 'default');
Expand All @@ -553,7 +553,7 @@ sre.MmlcloudEnglishTest.prototype.testLabelledLine = function() {
*/
sre.MmlcloudEnglishTest.prototype.testLabelledEmptyLine = function() {
var mml = '<mtable><mlabeledtr><mtd><mi>(1)</mi></mtd>' +
'<mtd></mtd></mlabeledtr></mtable>';
'<mtd></mtd></mlabeledtr></mtable>';
this.executeRuleTest(mml, 'StartLayout 1st Row with Label' +
' left-parenthesis 1 right-parenthesis EndLabel' +
' Blank EndLayout', 'default');
Expand All @@ -580,7 +580,7 @@ sre.MmlcloudEnglishTest.prototype.testEmptyLine = function() {
*/
sre.MmlcloudEnglishTest.prototype.testTextLabelledLine = function() {
var mml = '<mtable><mlabeledtr><mtd><mtext>(1)</mtext></mtd>' +
'<mtd><mi>a</mi></mtd></mlabeledtr></mtable>';
'<mtd><mi>a</mi></mtd></mlabeledtr></mtable>';
this.executeRuleTest(mml, 'StartLayout 1st Row with Label' +
' left-parenthesis 1 right-parenthesis EndLabel a' +
' EndLayout', 'default');
Expand Down
8 changes: 4 additions & 4 deletions tests/mmlcloud_spanish_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ sre.MmlcloudSpanishTest.prototype.testRelationsWithEmpty = function() {
*/
sre.MmlcloudSpanishTest.prototype.testLabelledRow = function() {
var mml = '<mtable><mlabeledtr><mtd><mi>(1)</mi></mtd>' +
'<mtd><mi>a</mi></mtd><mtd><mi>b</mi></mtd></mlabeledtr></mtable>';
'<mtd><mi>a</mi></mtd><mtd><mi>b</mi></mtd></mlabeledtr></mtable>';
this.executeRuleTest(mml, 'empezar esquema primera fila con etiqueta' +
' paréntesis izquierdo 1 paréntesis derecho' +
' finalizar etiqueta primera columna a segunda' +
Expand All @@ -562,7 +562,7 @@ sre.MmlcloudSpanishTest.prototype.testLabelledRow = function() {
*/
sre.MmlcloudSpanishTest.prototype.testLabelledLine = function() {
var mml = '<mtable><mlabeledtr><mtd><mi>(1)</mi></mtd>' +
'<mtd><mi>a</mi></mtd></mlabeledtr></mtable>';
'<mtd><mi>a</mi></mtd></mlabeledtr></mtable>';
this.executeRuleTest(mml, 'empezar esquema primera fila con etiqueta' +
' paréntesis izquierdo 1 paréntesis derecho' +
' finalizar etiqueta a finalizar esquema', 'default');
Expand All @@ -581,7 +581,7 @@ sre.MmlcloudSpanishTest.prototype.testLabelledLine = function() {
*/
sre.MmlcloudSpanishTest.prototype.testLabelledEmptyLine = function() {
var mml = '<mtable><mlabeledtr><mtd><mi>(1)</mi></mtd>' +
'<mtd></mtd></mlabeledtr></mtable>';
'<mtd></mtd></mlabeledtr></mtable>';
this.executeRuleTest(mml, 'empezar esquema primera fila con etiqueta' +
' paréntesis izquierdo 1 paréntesis derecho' +
' finalizar etiqueta espacio finalizar esquema',
Expand Down Expand Up @@ -614,7 +614,7 @@ sre.MmlcloudSpanishTest.prototype.testEmptyLine = function() {
*/
sre.MmlcloudSpanishTest.prototype.testTextLabelledLine = function() {
var mml = '<mtable><mlabeledtr><mtd><mtext>(1)</mtext></mtd>' +
'<mtd><mi>a</mi></mtd></mlabeledtr></mtable>';
'<mtd><mi>a</mi></mtd></mlabeledtr></mtable>';
this.executeRuleTest(mml, 'empezar esquema primera fila con etiqueta' +
' paréntesis izquierdo 1 paréntesis derecho' +
' finalizar etiqueta a finalizar esquema', 'default');
Expand Down
10 changes: 5 additions & 5 deletions tests/semantic_rule_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,16 +244,16 @@ sre.SemanticRuleTest.prototype.testQuadratic = function() {
var mml = '<mrow><mi>x</mi><mo>=</mo><mfrac><mrow><mo>&#x2212;</mo>' +
'<mi>b</mi><mo>&#xB1;</mo><msqrt><mrow><msup><mi>b</mi><mn>2</mn>' +
'</msup><mo>&#x2212;</mo><mn>4</mn><mi>a</mi><mi>c</mi></mrow></msqrt>' +
'</mrow><mrow><mn>2</mn><mi>a</mi></mrow></mfrac></mrow>';
'</mrow><mrow><mn>2</mn><mi>a</mi></mrow></mfrac></mrow>';
this.executeRuleTest(
mml,
'x equals negative b plus minus Square root of b squared minus four' +
mml,
'x equals negative b plus minus Square root of b squared minus four' +
' times a times c divided by two times a'
);
this.locale = 'es';
this.executeRuleTest(
mml,
'x equals negative b plus minus Square root of b squared minus four' +
mml,
'x equals negative b plus minus Square root of b squared minus four' +
' times a times c divided by two times a'
);
};
4 changes: 2 additions & 2 deletions tests/walker_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ goog.inherits(sre.WalkerTest, sre.AbstractTest);
sre.WalkerTest.prototype.setUpTest = function() {
this.system.setupEngine(
{semantics: true, locale: 'en', domain: 'mathspeak', style: 'default',
rules: ['AbstractionRules', 'MathspeakRules'],
speech: sre.Engine.Speech.NONE});
rules: ['AbstractionRules', 'MathspeakRules'],
speech: sre.Engine.Speech.NONE});
};


Expand Down

0 comments on commit 8cacbbc

Please sign in to comment.