Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/rust/glsl/tests/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 398 B image not shown  

Quelle  missing_zero_float.rs   Sprache: unbekannt

 
extern crate glsl;

use glsl::parser::Parse;
use glsl::syntax::TranslationUnit;

#[test]
fn missing_zero_float_is_valid() {
  let r = TranslationUnit::parse(
    "
    void main() {
      float x = 1. * .5;
    }",
  );

  assert!(r.is_ok());
}

#[test]
fn float_exp_is_valid() {
  let r = TranslationUnit::parse(
    "
    void main() {
      float x = 1e-5;
    }",
  );

  assert!(r.is_ok());
}

[ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet)  ]