oog.vec.Matrix4.applyTranslate(m0, 5, 6, 7);
    assertElementsEquals(m2, m0);
  }

  function testApplyScale() {
    var m0 = goog.vec.Matrix4.createIdentity();
    goog.vec.Matrix4.applyScale(m0, 3, 4, 5);
    assertElementsEquals([3, 0, 0, 0, 0, 4, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1], m0);
  }

  function testApplyRotate() {
    var m0 = goog.vec.Matrix4.createIdentity();
    goog.vec.Matrix4.applyRotate(m0, Math.PI / 2, 0, 0, 1);
    assertElementsRoughlyEqual(
        [0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0,