diff --git a/core/modules/number/lib/Drupal/number/Tests/NumberFieldTest.php b/core/modules/number/lib/Drupal/number/Tests/NumberFieldTest.php
index 925828c..778f015 100644
--- a/core/modules/number/lib/Drupal/number/Tests/NumberFieldTest.php
+++ b/core/modules/number/lib/Drupal/number/Tests/NumberFieldTest.php
@@ -49,7 +49,9 @@ function testNumberDecimalField() {
       'field_name' => drupal_strtolower($this->randomName()),
       'type' => 'number_decimal',
       'settings' => array(
-        'precision' => 8, 'scale' => 4, 'decimal_separator' => '.',
+        'precision' => 8,
+        'scale' => 4,
+        'decimal_separator' => '.',
       )
     );
     field_create_field($this->field);
@@ -129,6 +131,52 @@ function testNumberDecimalField() {
   }
 
   /**
+   * Test number_float field.
+   */
+  function testNumberFloatField() {
+    // Create a field with settings to validate.
+    $this->field = array(
+      'field_name' => drupal_strtolower($this->randomName()),
+      'type' => 'number_float',
+      'settings' => array(
+        'precision' => 8, 'scale' => 4, 'decimal_separator' => '.',
+      )
+    );
+    field_create_field($this->field);
+    $this->instance = array(
+      'field_name' => $this->field['field_name'],
+      'entity_type' => 'test_entity',
+      'bundle' => 'test_bundle',
+      'widget' => array(
+        'type' => 'number',
+      ),
+      'display' => array(
+        'default' => array(
+          'type' => 'number_float',
+        ),
+      ),
+    );
+    field_create_instance($this->instance);
+
+    // Display creation form.
+    $this->drupalGet('test-entity/add/test-bundle');
+    $langcode = LANGUAGE_NONE;
+    $field_name = $this->field['field_name'];
+    $this->assertFieldByName("{$field_name}[$langcode][0][value]", '', 'Widget is displayed');
+
+    // Submit a signed decimal value within the allowed precision and scale.
+    $value = '-1234.5678';
+    $edit = array(
+      "{$field_name}[$langcode][0][value]" => $value,
+    );
+    $this->drupalPost(NULL, $edit, t('Save'));
+    preg_match('|test-entity/manage/(\d+)/edit|', $this->url, $match);
+    $id = $match[1];
+    $this->assertRaw(t('test_entity @id has been created.', array('@id' => $id)), 'Entity was created');
+    $this->assertRaw(round($value, 2), 'Value is displayed.');
+  }
+
+  /**
    * Test number_integer field.
    */
   function testNumberIntegerField() {
@@ -163,5 +211,30 @@ function testNumberIntegerField() {
       "fields[field_$field_name][type]" => 'number_unformatted',
     );
     $this->drupalPost(NULL, $edit, t('Save'));
+
+    // Display creation form.
+    $this->drupalGet('test-entity/add/test-bundle');
+    $langcode = LANGUAGE_NONE;
+    $field_name = $this->field['field_name'];
+    $this->assertFieldByName("{$field_name}[$langcode][0][value]", '', 'Widget is displayed');
+
+    // Submit a valid integer.
+    $value = '123456';
+    $edit = array(
+      "{$field_name}[$langcode][0][value]" => $value,
+    );
+    $this->drupalPost(NULL, $edit, t('Save'));
+    preg_match('|test-entity/manage/(\d+)/edit|', $this->url, $match);
+    $id = $match[1];
+    $this->assertRaw(t('test_entity @id has been created.', array('@id' => $id)), 'Entity was created');
+    $this->assertRaw(round($value, 2),'Value is displayed.');
+
+    // Now submit an invalid integer and make sure we get an error message
+    $value = '1234.1';
+    $edit = array(
+      "{$field_name}[$langcode][0][value]" => $value,
+    );
+    $this->drupalPost(NULL, $edit, t('Save'));
+    $this->assertRaw(t('Only numbers are allowed'), 'Validation Error appears as expected');
   }
 }
